简单教程
提交运行
代码编辑器:
#!/usr/bin/python # -*- coding: UTF-8 -*- for letter in 'Python': # 遍历字符串 print letter fruits = ['banana', 'apple', 'mango'] for fruit in fruits: # 遍历列表 print fruit print "end."
运行结果: