Following syntax error in Mac OX10.7 Terminal
Andrew Berg
bahamutzero8825 at gmail.com
Thu Jun 28 13:31:47 EDT 2012
On 6/28/2012 12:11 PM, David Thomas wrote:
> 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
You indented in the IDE, but not in the interpreter. Indent with a space
or a tab. In Python, indentation is syntactically important. Everything
indented will be part of that while loop; the next line that isn't
indented will be considered not part of the loop.
--
CPython 3.3.0a4 | Windows NT 6.1.7601.17803
More information about the Python-list
mailing list