title: Getting confused with lambda and list comprehension
body: <p>Read a question on stack overflow sometime back with the following syntax</p>
  
  <pre><code>In [1]: [lambda: x for x in range(5)][0]()
  Out[1]: 4
  In [2]: [lambda: x for x in range(5)][2]()
  Out[2]: 4
  </code></pre>
  
  <p>But i am having a hard time to understand why exactly the output of this comes as 4,
  my understanding is it always gives the last value of the list as output,</p>
  
  <pre><code>In [4]: [lambda: x for x in [1,5,7,3]][0]()
  Out[4]: 3
  </code></pre>
  
  <p>but still not convinced how does this syntax ends up with the last value.</p>
  
  <p>Would be very glad if i can get a proper explanation for this syntax</p>