B
Billy Mays
I have always found that iterating over the indices of a list/tuple is
not very clean:
for i in range(len(myList)):
doStuff(i, myList)
I know I could use enumerate:
for i, v in enumerate(myList):
doStuff(i, myList)
....but that stiff seems clunky.
Are there any better ways to iterate over the indices of a list /tuple?
--Bill
not very clean:
for i in range(len(myList)):
doStuff(i, myList)
I know I could use enumerate:
for i, v in enumerate(myList):
doStuff(i, myList)
....but that stiff seems clunky.
Are there any better ways to iterate over the indices of a list /tuple?
--Bill