Simple if-else question

alex23 wuwei23 at gmail.com
Wed Sep 30 20:59:07 EDT 2009


dksr <dksre... at gmail.com> wrote:
> Yes thats what I thought. for-else looks similar to if-else and in if-
> else, else part is executed only when if part is not executed, but in
> for-else it has entirely a different job.

If you think of if-else more in terms of the else-branch occurring
when the if-condition is no longer true (as opposed to 'not
executing'), they're a lot more similar in approach than different.



More information about the Python-list mailing list