fork download
  1. def temp():
  2. for i in range(5):
  3. yield 2*i
  4.  
  5. g = temp()
  6.  
  7. l = list(g)
  8.  
  9. print(l)
Success #stdin #stdout 0.02s 27664KB
stdin
Standard input is empty
stdout
[0, 2, 4, 6, 8]