1、可直接作用于for循环的对象统称为可迭代对象:Iterable
2、isinstance函数:判断是否是可迭代对象isinstance([],Iterable)(需先from collections import Iterable)
3、迭代器:可以被next()函数调用并不断地返回下一个值的对象
4、iter()函数:把list、dict、str等可迭代对象变成迭代器
迭代器
原文:https://www.cnblogs.com/Treelight/p/9874215.html