any() and all() on empty list?

Ron Adam rrr at ronadam.com
Sat Apr 1 19:46:43 EST 2006


Ron Adam wrote:
> Steve R. Hastings wrote:

>> This neatly replaces truecount(), and you can use it for other things as
>> well.
> 
>     if True in talley(S): do_somthing()
> 
> Works for me...  ;-)
> 
> 
> Cheers,
>   Ron

Actulley talley isn't needed for this...

      if True in S: do_domething()


That's what I get for staying up way too late last night.

Cheers, Ron




More information about the Python-list mailing list