"Paul Rubin" <http://phr...@nospam.invalid> wrote:


> Steven D'Aprano <s...@source.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
> 
Ugh!!!!

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

:-)

- Hendrik

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to