title: How to output an index while iterating over an array in python
body: <p>I am iterating over an array in python:</p>
  
  <pre><code>for g in [ games[0:4] ]:
      g.output()
  </code></pre>
  
  <p>Can I also initialise and increment an index in that <code>for</code> loop and pass it to <code>g.output()</code>?</p>
  
  <p>such that <code>g.output(2)</code> results in:</p>
  
  <pre><code>Game 2 - ... stuff relating to the object `g` here.
  </code></pre>