赞
踩
for i in range(5): print(i)
输出:0,1,2,3,4
默认从0开始
for i in range(1,5): print(i)
输出:1,2,3,4
指定从1开始
for i in range(1,7,2): print(i)
输出:1,3,5
第三个参数是步长