0
Regarding code syntex error
Where is the problem in 2 line code ? please see below simple code in python 3 and its give error when I compile it in playground name = "manash" print len(name) Error Showing as below: File "..\Playground\", line 2 print len(name) ^ SyntaxError: invalid syntax
2 Answers
+ 5
print (len(name))
+ 1
The statements you wrote is accepted in python 2.* but the playground executes in python 3.x. So, you have to write as Sami Khan suggested.