Why bool( object )?

Paul Rubin http
Fri May 1 09:22:22 CEST 2009


Steven D'Aprano <steven at REMOVE.THIS.cybersource.com.au> writes:
> for x in a or b or c:
>     do_something_with(x)

Ugh!!!!

  for x in [a,b,c]:
     if len(x) > 0:
       do_something_with(x)
       break



More information about the Python-list mailing list