According to this discussion: http://bytes.com/topic/python/answers/464012-objects-list-indexobject's list index
Loop counter iteration
The current idiom for looping over the indices makes use of the built-in range
function:
for i in range(len(sequence)):
# workWork with index i
Looping over both elements and indices can be achieved either by the old idiom or by using the new zip
built-in function:
for i in range(len(sequence)):
e = sequence[i]
# workWork with index i and element e
or
for i, e in zip(range(len(sequence)), sequence):
# workWork with index i and element e
via http://www.python.org/dev/peps/pep-0212/PEP 212 – Loop Counter Iteration.