examples/generators/simple_generator.py
from __future__ import print_function

def number():
    yield 42
    yield 19
    yield 23

for n in number():
  print(n)
# 42
# 19
# 23