poros
10/4/2015 - 2:55 PM

Loop over a collection and indexes

Loop over a collection and indexes

for i in range(len(colors)):
    print i, colors[i]
  
  
for i, colors in enumerate(colors):
    print i, colors
# retuns enumerate object, not a list