chore: add
This commit is contained in:
@@ -78,7 +78,7 @@ StopIteration
|
||||
|
||||
**Analogy**: An iterable is like a book (one can flip through the pages) and an iterator for a book would be a bookmark (saves the position and can locate the next page). Calling `iter` on a book gives you a new bookmark independent of other bookmarks, but calling `iter` on a bookmark gives you the bookmark itself, without changing its position at all. Calling `next` on the bookmark moves it to the next page, but does not change the pages in the book. Calling `next` on the book wouldn't make sense semantically. We can also have multiple bookmarks, all independent of each other.
|
||||
|
||||
## 生成器:懒人迭代器!
|
||||
## 生成器:懒人迭代器!
|
||||
|
||||
```python
|
||||
def test_iterator():
|
||||
|
||||
Reference in New Issue
Block a user