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

16th Dec 2017, 1:12 PM
Manash Chakraborty Raju
Manash Chakraborty Raju - avatar
2 Respuestas
+ 5
print (len(name))
16th Dec 2017, 1:15 PM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar
+ 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.
20th Jul 2018, 10:17 PM
Sundeep Theguyforanalytics
Sundeep Theguyforanalytics - avatar