Following syntax error in Mac OX10.7 Terminal

David Thomas dthomas86 at me.com
Thu Jun 28 13:11:52 EDT 2012


Hi,
I have the following error regarding a loop tutorial found on http://www.sthurlow.com/python/lesson04/

>>> a=0
>>> while a<10:
... a=a+1
  File "<stdin>", line 2
    a=a+1
    ^
IndentationError: expected an indented block

When I run Python IDE it seems to work fine.  The following code is:


a=0
while a<10:
    a=a+1
    print a 


Kind regards



More information about the Python-list mailing list