迭代Iteratio
来源:互联网 发布:windows live id注册 编辑:程序博客网 时间:2024/05/19 02:22
1.Python中的for语句遍历就是迭代。
2.可迭代对象:list,tuple,dict,str等.
3.判断是不是可迭代对象:通过collections模块的Iterable类型
>>> from collections import Iterable>>> isinstance('is or not',Iterable)True
0 0