Code Lab

Generators

odds = (n for n in range(1, 20) if n % 2) for n in odds: print(n)
:
Input
Input Data (stdin):
Output
1
3
5
7
9
11
13
15
17
19