简单的获取list的下标 使用enumerate函数: 1 age=[10,13,14,56] 2 #利用枚举函数直接获取list里面的下标 3 for i,x in enumerate(age): 4 print(i,x)