using the enumerate() : Enumerate : List PYTHON TUTORIALS


PYTHON TUTORIALS » List » Enumerate »

 

using the enumerate()


nameList = ['A''B''C''D','E''F''G']

for i, eachLee in enumerate(nameList):
     print "%d %s Lee" (i+1, eachLee)



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo List
» Enumerate