mirror of
https://github.com/satwikkansal/wtfpython.git
synced 2025-08-12 08:03:57 +02:00
Correct six typos
This commit is contained in:
2
README.md
vendored
2
README.md
vendored
@@ -2113,7 +2113,7 @@ Where did element `3` go from the `numbers` list?
|
||||
result.append(elem)
|
||||
yield tuple(result)
|
||||
```
|
||||
- So the function takes in arbitrary number of utterable objects, adds each of their items to the `result` list by calling the `next` function on them, and stops whenever any of the iterable is exhausted.
|
||||
- So the function takes in arbitrary number of iterable objects, adds each of their items to the `result` list by calling the `next` function on them, and stops whenever any of the iterable is exhausted.
|
||||
- The caveat here is when any iterable is exhausted, the existing elements in the `result` list are discarded. That's what happened with `3` in the `numbers_iter`.
|
||||
- The correct way to do the above using `zip` would be,
|
||||
```py
|
||||
|
Reference in New Issue
Block a user