《Python进阶》读书笔记1-迭代器
《Python进阶》是《Intermediate Python》的中文版,几个月前在 V2EX 上偶然看到,瞄了几眼发现这本书每一章都很简短清晰,适合碎片时间阅读,就放到了收藏夹了。大体上说这本书是 tips 类型的,不适合新手入门看,至少需要了解、实践过了 Python 的常用语法才会看得比较流畅。我读完所有内容后又过了第二遍,把一些我觉得有意思的、不太熟悉的内容摘出来记一下。
iterator, generator, enumerate迭代器(iterator)文档:
An object representing a stream of data. Repeated calls to the iterator’s next() method return successive items in the stream. When no more data are available
...