How to output an index while iterating over an array in python
- by BeeBand
I am iterating over an array in python:
for g in [ games[0:4] ]:
g.output()
Can I also initialise and increment an index in that for loop and pass it to g.output()?
such that g.output(2) results in:
Game 2 - name: Fruit Splat, text: "Splat fruits!", bitrate: 250000