Conditional iteration

Terry Reedy tjreedy at udel.edu
Wed Dec 13 14:13:54 EST 2006


"at" <at at tuko.nl> wrote in message 
news:4580149c$0$321$e4fe514c at news.xs4all.nl...
>
> More pythonic in view would be:
>
> for x in [-2, -1, 0, 1, 2, 3, 4] if x > 0:
>        ... more code ...

Already proposed by someone and rejected by GvR.







More information about the Python-list mailing list