Arnaud Delobelle <arnodel at googlemail.com> writes: > def all(iterable): > for x in iterable: > if not x: return False > return True from itertools import imap def all(iterable): return False not in imap(bool, iterable) def any(iterable): return True in imap(bool, iterable)