任意对象,只要定义了next (Python2) 或者__next__ 方法,它就是一个迭代器。就这么简单。现在我们来理解迭代(iteration) |
Archiver|手机版|笨鸟自学网 ( 粤ICP备20019910号 )
GMT+8, 2025-8-31 00:42 , Processed in 0.015618 second(s), 19 queries .
Powered by Discuz! X3.5
© 2001-2017 Discuz Team. Template By 【未来科技】【 www.wekei.cn 】