Is there a more elegant way to spell this?

Emile van Sebille emile at fenx.com
Tue Jan 27 13:27:32 EST 2015


On 1/27/2015 9:49 AM, Rob Gaddi wrote:
> Or the somewhat less indenty
>
> for x in seq:
>      if not some_predicate: continue
>      do_something_to(x)
>


... or shorter and equally less indenty


for x in seq:
     if some_predicate: do_something_to(x)




More information about the Python-list mailing list