2013年3月28日 - Use the enumerate() function to generate the index along with the elements of the sequence you are looping over: for index, w in enumerate(loopme): ...
stackoverflow.com