frustrating failure of 'break' statement ( novice )
dickinsm at gmail.com
Sat Jun 13 18:07:10 EDT 2009
On Jun 13, 10:48 pm, pdlem... at earthlink.net wrote:
> In my programs the 'break' fails to work. I've studied the docs for
> 3.0 and Programming in Python, neither of which are illuminating.
> Simplest example :
> while True :
> num = int(input())
> if num == 0 :
> SyntaxError : invalid syntax ( pointing to end of break )
Are you mixing tabs and spaces in your code at all? Check that the
'break' line is indented with 8 spaces rather than a tab character.
More information about the Python-list