0

length of a srting

a = 67 b = a+1 c = a**b print (c) print len(str(c)) i am a newbie. i have written a simple code but when i try to run it, it gives the following error. File "..\Playground\", line 5 print len(str(c)) ^ SyntaxError: invalid syntax please tell me where am I wrong? Thanks

13th Jan 2017, 7:06 AM
Hussain Ali Magarwala
Hussain Ali Magarwala - avatar
2 Answers
+ 2
You should use print with (parentheses), in the second one.
13th Jan 2017, 7:09 AM
Álvaro
+ 2
print(len(str(c)))
13th Jan 2017, 7:12 AM
Kawaii
Kawaii - avatar