On Thu, Oct 2, 2008 at 11:42 AM, David <[EMAIL PROTECTED]> wrote:
> Thanks, Luke, that makes sense.
>
This is only applicable to the interpreter, though. It's perfectly legal to
have a statement on the line immediately following a loop when you're
writing code files.
Also, please use "reply all"
note that I meant it's not tabbed correctly *to be part of the for loop*.
On Thu, Oct 2, 2008 at 9:42 AM, Luke Paireepinart <[EMAIL PROTECTED]>wrote:
> You are having an issue with the interpreter. You can only submit 1
> command at a time to the interpreter.
> Therefore, you need to finish your
You are having an issue with the interpreter. You can only submit 1 command
at a time to the interpreter.
Therefore, you need to finish your for loop and hit enter *twice* so that
the interpreter knows you're done with the loop.
The reason you're getting an error is it's trying to put your "print
Dear list,
I was just trying the following code:
for i in range(0, 10, 2):
print i
print "done!"
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 "", line 3
print "done!"
^
As far as I understand, t