Iterating by Sequence Index : loop through « List « Python Tutorial






nameList = ['A', "B", 'C', 'D', 'E']
for nameIndex in range(len(nameList)):
     print "Liu,", nameList[nameIndex]








7.16.loop through
7.16.1.Iterating by Sequence Item
7.16.2.Iterating by Sequence Index
7.16.3.Appending items to a list.