What is the most efficient way to test for False in a list?
usenet-mail-0306.20.chr0n0ss at spamgourmet.com
Mon Jul 9 17:34:23 CEST 2007
Diez B. Roggisch wrote:
> Bjoern Schliessmann wrote:
>> Paul Rubin wrote:
>>> lex <alexander.somma at gmail.com> writes:
>>>> but what is your best way to test for for False in a list?
>>> status = all(list)
>> Am I mistaken, or is this no identity test for False at all?
> You are mistaken. all take an iterable and returns if each value
> of it is true.
That's an identity test for True, not for False (the latter was
requested). Thus, I'm not mistaken.
BOFH excuse #236:
Fanout dropping voltage too much, try cutting some of those little
More information about the Python-list