generator - unbound count (with yield)



examples/generators/count_manual.py
def count(start=0, step=1):
    n = start
    while True:
        yield n
        n += step


for c in count(start=19, step=1):
    print(c)
    if c > 23:
        break

19
20
21
22
23
24