1、字符串
str="hellopython" for i in str: print(i)
![](https://images2018.cnblogs.com/blog/1024010/201803/1024010-20180322193822103-1427589699.png)
2、列表
ls=['h''e''l''l''o''p''y''t''h''o''n'] for i in ls: print(i)
![](https://images2018.cnblogs.com/blog/1024010/201803/1024010-20180322194017478-1829479357.png)
3、元组
t=('hello','python',2018) for i in t: print(i)
![](https://images2018.cnblogs.com/blog/1024010/201803/1024010-20180322194317504-297371609.png)
4、字典
d={'p':0,'y':1,'t':2,'h':3,'o':4,'n':5} for i in d: print(i)
![](https://images2018.cnblogs.com/blog/1024010/201803/1024010-20180322194602316-1624820343.png)
5、集合
st =set('h''e''l''l''o''p''y''t''h''o''n') for i in st: print(i)
![](https://images2018.cnblogs.com/blog/1024010/201803/1024010-20180322194847036-1489546104.png)