t232.py 378 B

12345678910111213141516171819202122
  1. c = "squirrel"
  2. time = 0
  3. def x():
  4. global time
  5. time += 1
  6. if time == 1:
  7. b = "dog"
  8. else:
  9. b = "banana"
  10. print b, c
  11. def y(d):
  12. a = "cat"
  13. print a,b,d
  14. def z():
  15. for i in range(10*time):
  16. yield i,a,b,c,d
  17. return z
  18. return y("blorp")
  19. for v in x()():
  20. print v
  21. for v in x()():
  22. print v