dic = [1,2,3,4,5] for a,b in enumerate(dic): print(a,b) # a就是索引 b是元素 转载于:https://www.cnblogs.com/niuli1987/p/9300423.html