range

for i in range(10,0,-2):
print(i)

输出: 10 8 6 4 2

for i in range(0,10,2)

print(i)

输出 2 4 6 8 10

posted on 2018-10-27 23:25  sunny1233901  阅读(250)  评论(0编辑  收藏  举报