t230.py 118 B

12345678
  1. def f(n):
  2. for i in range(n):
  3. yield i
  4. g = f(5)
  5. print g.next()
  6. print g.next()
  7. print g.next()
  8. print g.next()