t177.py 97 B

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