上例子
字符串
for x in "abcd": print x,"hello world"
列表
fruits = ['apple','banana','mango'] for index in range(len(fruits)): print 'fruit: ',fruits[index]
元组
t = (1,2,3,'a','b') for x in range(len(t)): print t[x]
range使用
for n in range(1,11): print n,"num"
for n in range(1,11,3): print n,"num"