Dave Hansen <iddw at hotmail.com> 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