Why bool( object )?

Paul Rubin http
Fri May 1 03:22:22 EDT 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