t555.py 164 B

1234567891011
  1. from time import sleep
  2. def sleeping_generator():
  3. for i in range(5):
  4. sleep(0.01)
  5. yield i
  6. x = (i for i in sleeping_generator())
  7. print list(x)