title: List comprehension with lambda function
body: <pre><code>def multipliers():
      return [lambda x: i * x for i in range(4)]
  
  
  print([m(1) for m in multipliers()]) # [3, 3, 3, 3]
  </code></pre>
  
  <p>Why it's not <code>[0, 1, 2, 3]</code>? Can't understand. So, for some reason we have <code>i = 3</code> in all lambdas? Why?</p>