Silly question: I have a simple for loop followed by a simple if statement:
for airport in airports: if airport.is_important:
and
I'd use a negative guard on the loop. It's readable, and doesn't introduce an extra level of indentation.
for airport in airports: if not airport.is_important: continue