Browse Source

Iterators

pull/27/head
Jure Šorn 6 years ago
parent
commit
45b80ceaae
1 changed files with 3 additions and 3 deletions
  1. 6
      README.md

6
README.md

@ -1385,15 +1385,15 @@ from itertools import *
### Iterators ### Iterators
```python ```python
>>> chain([1, 2], range(3, 5)) >>> chain([1, 2], [3, 4])
[1, 2, 3, 4] [1, 2, 3, 4]
>>> compress([1, 2, 3, 4], [True, False, 1, 0]) >>> compress([1, 2, 3, 4], [True, False, 1, 0])
[1, 3] [1, 3]
>>> # islice(<collection>, from_inclusive, to_exclusive) >>> # islice(<collection>, from_inclusive, to_exclusive)
>>> islice([1, 2, 3], 1, None) >>> islice([1, 2, 3, 4], 2, None)
[2, 3] [3, 4]
``` ```
### Group by ### Group by

|||||||
100:0
Loading…
Cancel
Save