On Jun 13, 10:48 pm, pdlem...@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()) > print(num) > if num == 0 : > break > > print('done') > > 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. Mark -- http://mail.python.org/mailman/listinfo/python-list