21.
List Comprehensions
# These two are equivalent:
result = []
for v in iter:
if cond:
result.append(expr)
[ expr for v in iter if cond ]
# You can nest loops also:
result = []
for v1 in iter1:
for v2 in iter2:
if cond:
result.append(expr)
[ expr for v1 in iter1 for v2 in iter2 if cond ]