fork download
  1. def foo(i):
  2.  
  3. for j in range(i):
  4.  
  5. def bar(k):
  6.  
  7. def baz(m):
  8.  
  9. return k + m
  10.  
  11. return baz
  12.  
  13. yield bar(j)
  14.  
  15. a, b, c = foo(3)
  16. print(a(1), b(1), c(1))
  17.  
Success #stdin #stdout 0.02s 8688KB
stdin
Standard input is empty
stdout
1 2 3