title: Python using enumerate inside list comprehension
body: <p>Lets suppose I have a list like this:</p>
  
  <pre><code>mylist = ["a","b","c","d"]
  </code></pre>
  
  <p>To get the values printed along with their index I can use Python's <code>enumerate</code> function like this</p>
  
  <pre><code>&gt;&gt;&gt; for i,j in enumerate(mylist):
  ...     print i,j
  ...
  0 a
  1 b
  2 c
  3 d
  &gt;&gt;&gt;
  </code></pre>
  
  <p>Now, when I try to use it inside a <code>list comprehension</code> it gives me this error</p>
  
  <pre><code>&gt;&gt;&gt; [i,j for i,j in enumerate(mylist)]
    File "&lt;stdin&gt;", line 1
      [i,j for i,j in enumerate(mylist)]
             ^
  SyntaxError: invalid syntax
  </code></pre>
  
  <p>So, my question is: what is the correct way of using enumerate inside list comprehension?</p>