chore: add (#126)

* chore: add

* Update 1.12选课原则与抢课技巧.md
This commit is contained in:
LeiSure
2023-09-25 19:55:31 +08:00
committed by GitHub
parent 08c9571b1e
commit c6e50aa3a9
11 changed files with 37 additions and 36 deletions

View File

@@ -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():