Dave Hansen <[EMAIL PROTECTED]> writes: > Well, if you want something minimalist, you could try > > def truth_test(seq): > return sum(1 for item in seq if item) == 1
def truth_test(seq): return sum(map(bool, seq)) == 1 -- http://mail.python.org/mailman/listinfo/python-list