代码 通过枚举实现 a = [1,2,3,4,5,6] for i,j in enumerate(a): print i,j 结果 0 1 1 2 2 3 3 4 4 5 5 6 转载于:https://www.cnblogs.com/lurenjia1994/p/9706816.html