t193.py 195 B

123456789101112
  1. def f(l):
  2. for i in 1,2,3,4,5:
  3. yield l, i
  4. a, b = f("a"), f("b")
  5. print a.next()
  6. print a.next()
  7. print b.next()
  8. print b.next()
  9. print b.next()
  10. print a.next()
  11. print b.next()
  12. print a.next()