title: Appending indices efficiently
body: <p>I want to add indices to all tuples in a list (by creating a new list?). I will give an example of what I tried. I wish to make the operation faster and I appreciate any suggestions.</p>
  
  <p>Let's assume I am at a certain iteration having </p>
  
  <pre><code>L = [(1463270, 0.681), (1432058, 0.678), (537044, 0.677), (252225, 0.677), (1222737, 0.676)]
  </code></pre>
  
  <p>Here L contains 5 tuples, but I am actually working with hundreds of thousands of tuples in one list.</p>
  
  <p>I wish to add indices to every tuple in L getting to</p>
  
  <pre><code>L = [(1463270, 0.681, 1), (1432058, 0.678, 2), (537044, 0.677, 3), (252225, 0.677, 4), (1222737, 0.676, 5)]
  </code></pre>
  
  <p>I need the indices in computing final scores and I tried this:</p>
  
  <pre><code>iL = []
  for i in range(1,top+1):    ## top = 5 in my example
      iL.append(L[i-1] + (i,))
  </code></pre>
  
  <p>But I really wish to avoid using such a loop when top = 500,000 and having 3,000,000 iterations. Is there a method to resolve my question using map perhaps?</p>