[Tutor] syntax error with a simple print command
ldl08 at gmx.net
Thu Oct 2 16:35:12 CEST 2008
I was just trying the following code:
for i in range(0, 10, 2):
But I do get a syntax error, and I don't understand why:
>>> for i in range(0, 10, 2):
... print i
... print "done!"
File "<stdin>", line 3
As far as I understand, the for loop is executed, and once the loop is
done Python exits the for loop and continues with the next command
Why is he complaining??
Many thanks for enlightening me!
More information about the Tutor