Comment Comment by thaumasiotes > what does "else: do after a while loop in python? Only people who know python know what it does (and I suspect most don't).OK, I had never heard of the syntax, but in its own defense it does exactly what you'd guess, the same thing it does after an "if".These are equivalent statements: preloop: if condition: do_more_stuff() goto preloop while condition: do_more_stuff() and these are also equivalent: preloop: if condition: do_more_stuff() goto preloop else: wrap_it_ip() while condition: do_more_stuff() else: wrap_it_up() parent thaumasiotes 11 months ago
OK, I had never heard of the syntax, but in its own defense it does exactly what you'd guess, the same thing it does after an "if".
These are equivalent statements:
and these are also equivalent: