 |
How to loop through the index of a list in python? - Stack ...
2012年9月10日 - I'm trying to write to a file, with the first line being [0] in the list, 2nd line ... use enumerate() : for ind,line in enumerate(l): print ind,line. example:
stackoverflow.com |
 |