Silly question: I have a simple for loop followed by a simple if statement:
for airport in airports: if airport.is_important:
and
Mabe this, but it's more or less the same verbose...
import itertools for airport in itertools.ifilter(lambda x: x.is_important, airports): ...