fork download
  1. def y():
  2. for i in range(5):
  3. if(i == 3): return
  4. yield i
  5.  
  6. print list(y())
  7.  
Success #stdin #stdout 0.01s 7728KB
stdin
Standard input is empty
stdout
[0, 1, 2]