tjreedy at udel.edu
Tue Mar 4 22:40:53 CET 2008
<bearophileHUGS at lycos.com> wrote in message
news:c4921e6c-119f-4306-8e89-c436c3cb6f6d at u69g2000hse.googlegroups.com...
| So far in Python I've almost hated the 'else' of the 'for' loops:
| - I have problems to remember its meaning;
Consider the following pseudoPython which you should understand:
We actually write the above as
Same meaning; do_else is executed when condition is false.
A for-loop is equivalent to a while loop with the condition 'iterator is
not exhausted'. So do_else when that condition is false -- the iterator is
Terry Jan Reedy
More information about the Python-list