[Tutor] Usefulness of BIFs all() and any()?
d at davea.name
Tue Sep 25 14:33:22 CEST 2012
On 09/25/2012 07:55 AM, Richard D. Moores wrote:
> And why
Same problem as calling sum() with an empty list. What value should it
have? Clearly, it should return its 'start' parameter, which defaults
Well the all() has a start value of True, and ands that with each
element of the iterable till one of them ends up with false. Similarly,
the any() has a start value of False.
More information about the Tutor