title: Get index value in python list comprehension (for in preceded with variable)
body: <p>This syntax is able to define new list above list (or array):</p>
  <pre><code>[v for v in ['a', 'b']]
  </code></pre>
  <p>But how to get the index of the list? This doesn't work</p>
  <pre><code>[k for k, v in ['a', 'b']]
  </code></pre>
  <p>Expected output</p>
  <pre><code>[0, 1]
  </code></pre>