Iterating across a filtered list

Łukasz Ligowski lligo at icm.edu.pl
Tue Mar 13 18:25:03 EDT 2007


Hi,

On Tuesday 13 of March 2007 22:16:32 Arnaud Delobelle wrote:

> for x in L:
>     if g(x):
>         do stuff with f(x)

for x in itertools.ifilterfalse(g, L):
	do stuff

Maybe this would be even better?

L



More information about the Python-list mailing list