Something I forgot to add. This idea of side-effects with the conditionals is actually the whole point of the Python built-in functinos any() and all(). any() will evaluate a generator expression and stops when one of them evaluates to True, and all() works the same, but stops when a False is encountered. If you google these, you are bound to find some helpful examples and explanations.
For example, https://docs.python.org/2.7/howto/functional.html Cheers _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor