Because it's logical.

If the exit condition was placed on the top, the loop would exit immediatly.

Instead the desired behaviour might be to execute the code inside the loop first and then exit.

Thus seperating logic into enter and exit conditions makes sense.

Bye,
Skybuck.
--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to