list_test =[1,2,3,4,5] for i in range(0,len(list_test)): print(i)
结果是 1 2 3 4 5
注意
for i in range 是前闭后开的。