returning True, False or None

Mick Krippendorf mad.mick at gmx.de
Fri Feb 4 23:12:51 EST 2005


Fahri Basegmez wrote:
> reduce(lambda x, y: x or y, lst)

This doesn't solve the OPs problem since

 >>> reduce(lambda x, y: x or y, [False, None])

returns None instead of False.

Mick.




More information about the Python-list mailing list