|
|
@ -750,7 +750,7 @@ Itertools |
|
|
|
from itertools import * |
|
|
|
``` |
|
|
|
|
|
|
|
### Combinatoric Iterators |
|
|
|
### Combinatoric iterators |
|
|
|
|
|
|
|
```python |
|
|
|
>>> combinations('abc', 2) |
|
|
@ -790,7 +790,7 @@ from itertools import * |
|
|
|
>>> compress('abc', [True, 0, 1]) |
|
|
|
['a', 'c'] |
|
|
|
|
|
|
|
islice([1, 2, 3], 1, None) # islice(<seq>, from_inclusive, to_exclusive) |
|
|
|
>>> islice([1, 2, 3], 1, None) # islice(<seq>, from_inclusive, to_exclusive) |
|
|
|
[2, 3] |
|
|
|
|
|
|
|
>>> a = [{'id': 1, 'name': 'bob'}, |
|
|
|