title: python list comprehension to produce two values in one iteration
body: <p>I want to generate a list in python as follows - </p>
  
  <pre><code>[1, 1, 2, 4, 3, 9, 4, 16, 5, 25 .....]
  </code></pre>
  
  <p>You would have figured out, it is nothing but <code>n, n*n</code></p>
  
  <p>I tried writing such a list comprehension in python as follows - </p>
  
  <pre><code>lst_gen = [i, i*i for i in range(1, 10)]
  </code></pre>
  
  <p>But doing this, gives a syntax error. </p>
  
  <p>What would be a good way to generate the above list via list comprehension?</p>