fork download
  1. def multipliers():
  2. return [lambda x : i * x for i in range(4)]
  3.  
  4. print [m(2) for m in multipliers()]
  5.  
  6.  
Success #stdin #stdout 0.01s 7012KB
stdin
Standard input is empty
stdout
[6, 6, 6, 6]