Skip to content

Commit 0648840

Browse files
committed
Iterator
1 parent e31ad08 commit 0648840

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -182,12 +182,6 @@ from itertools import islice, count, repeat, cycle, chain
182182
<el> = next(<iter> [, default]) # Raises StopIteration or returns 'default' on end.
183183
```
184184

185-
```python
186-
<iter> = islice(<collection>, to_exclusive)
187-
<iter> = islice(<collection>, from_inclusive, to_exclusive)
188-
<iter> = islice(<collection>, from_inclusive, to_exclusive, step_size)
189-
```
190-
191185
```python
192186
<iter> = count(start=0, step=1) # Returns incremented integer endlessly.
193187
<iter> = repeat(<el> [, times]) # Returns element endlessly or 'times' times.
@@ -199,6 +193,12 @@ from itertools import islice, count, repeat, cycle, chain
199193
<iter> = chain.from_iterable(<collection>) # Empties collections inside a collection in order.
200194
```
201195

196+
```python
197+
<iter> = islice(<collection>, to_exclusive)
198+
<iter> = islice(<collection>, from_inclusive, to_exclusive)
199+
<iter> = islice(<collection>, from_inclusive, to_exclusive, step_size)
200+
```
201+
202202
### Examples
203203
#### Reads input until it reaches an empty line:
204204
```python

0 commit comments

Comments
 (0)