From 22b3590082466889e6754c63efa5b6a67b5b4213 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 27 Feb 2019 15:43:34 +0100 Subject: [PATCH] Iterator --- README.md | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/README.md b/README.md index 86734a2..355c11e 100644 --- a/README.md +++ b/README.md @@ -199,27 +199,6 @@ from itertools import islice, count, repeat, cycle, chain = islice(, from_inclusive, to_exclusive, step_size) ``` -### Examples -#### Reads input until it reaches an empty line: -```python -for line in iter(input, ''): - ... -``` - -#### Same, but prints a message every time: -```python -from functools import partial -for line in iter(partial(input, 'Please enter value: '), ''): - ... -``` - -#### Skips first item: -```python -next() -for element in : - ... -``` - Generator ---------