Felipe Almeida Lessa wrote: > The problem is that it will evaluate all possibilities needlessly. Try > (not tested and 2.4-only):
footnote: if you have a recent Python 2.5 build, you can make them even shorter: >>> help(any) any(...) any(iterable) -> bool Return True if bool(x) is True for any x in the iterable. >>> help(all) all(...) all(iterable) -> bool Return True if bool(x) is True for all values x in the iterable. </F> -- http://mail.python.org/mailman/listinfo/python-list