From 06488408b93d666e1e31594c18aa6a444ec890b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 27 Feb 2019 15:39:45 +0100 Subject: [PATCH] Iterator --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fc48243..86734a2 100644 --- a/README.md +++ b/README.md @@ -182,12 +182,6 @@ from itertools import islice, count, repeat, cycle, chain = next( [, default]) # Raises StopIteration or returns 'default' on end. ``` -```python - = islice(, to_exclusive) - = islice(, from_inclusive, to_exclusive) - = islice(, from_inclusive, to_exclusive, step_size) -``` - ```python = count(start=0, step=1) # Returns incremented integer endlessly. = repeat( [, times]) # Returns element endlessly or 'times' times. @@ -199,6 +193,12 @@ from itertools import islice, count, repeat, cycle, chain = chain.from_iterable() # Empties collections inside a collection in order. ``` +```python + = islice(, to_exclusive) + = islice(, from_inclusive, to_exclusive) + = islice(, from_inclusive, to_exclusive, step_size) +``` + ### Examples #### Reads input until it reaches an empty line: ```python