>>> exp='welcom to python'
>>> for i in exp:
print(i,end=' ')
w e l c o m t o p y t h o n
>>>
>>> weeks=['星期一','星期二','星期三','星期四','星期五','星期六','星期天']
>>> for day in weeks:
print(day,len(day))
星期一 3
星期二 3
星期三 3
星期四 3
星期五 3
星期六 3
星期天 3
>>>
>>> range(3)
range(0, 3)
>>> list(range(3))
[0, 1, 2]
>>> for i in range(3):
print(i)
0
1
2
>>>
>>> for i in range(3,6):
print(i)
3
4
5
>>>
>>> for i in range(2,9,2):
print(i)
2
4
6
8
>>> for i in range(2,8,2):
print(i)
2
4
6
>>>