Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #24626
| Date | 2012-06-28 12:31 -0500 |
|---|---|
| From | Andrew Berg <bahamutzero8825@gmail.com> |
| Subject | Re: Following syntax error in Mac OX10.7 Terminal |
| References | <5eacd83f-03c9-43b5-b799-733aa576b1df@googlegroups.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1614.1340904733.4697.python-list@python.org> (permalink) |
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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Following syntax error in Mac OX10.7 Terminal David Thomas <dthomas86@me.com> - 2012-06-28 10:11 -0700
Re: Following syntax error in Mac OX10.7 Terminal Andrew Berg <bahamutzero8825@gmail.com> - 2012-06-28 12:31 -0500
Re: Following syntax error in Mac OX10.7 Terminal David Thomas <dthomas86@me.com> - 2012-06-28 11:22 -0700
csiph-web