>>> for i in range(5):
print(i)
 
 
0
1
2
3
4
>>> for i in range(0, 5):
print(i)
 
 
0
1
2
3
4
>>> for i in range(1, 5):
print(i)
 
 
1
2
3
4
>>> for i in range(5, 0, -1):
print(i)
 
 
5
4
3
2
1
posted on 2017-02-06 20:07  john2017  阅读(86)  评论(0编辑  收藏  举报