Python shell shows error with a bad syntax

Asked By 0 points N/A Posted on -


I think I missed something and this error appeared. I double checked everything and I can’t figure out what I missed. Can anyone tell me what I did wrong that created this error ? Could this be an error from the program ?

Regards experts !

Syntax error

There’s an error in your program: ECL while scanning single quoted string.

Answered By 110 points N/A #179474

Python shell shows error with a bad syntax



EOL means there is a problem in your code and that’s why such error is appearing.

EOL means “End of Line”. There is a syntax error in your program’s last line’s end where something problematic was typed. As I can see, after “print 1”, there is an extra comma which is not expected. Though the program ran well, it threw up the error.

In order to fix this problem, you can try to run the following code:

for i in range(10):
                print i

This should solve your issue. For more debugging help, you can visit this page.

Login/Register to Answer

Related Questions