在python中对列表进行遍历并获取列表索引的方法
colours = ["red","green","blue"]for i, colour in enumerate(colours):print i, colour
colours = ["red","green","blue"]
for i, colour in enumerate(colours):
print i, colour