From cc85472b95421a1f0df2106781dd06457efb95d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Wed, 19 Dec 2018 10:50:19 +0100 Subject: [PATCH] Iterators --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d70079b..55facc7 100644 --- a/README.md +++ b/README.md @@ -406,7 +406,7 @@ lambda , : [i+1 for i in range(10)] # [1, 2, ..., 10] [i for i in range(10) if i>5] # [6, 7, ..., 9] {i: i*2 for i in range(10)} # {0: 0, 1: 2, ..., 9: 18} -(x+5 for x in range(0, 10)) # (5, 6, ..., 14) -> Generator +(x+5 for x in range(0, 10)) # (5, 6, ..., 14) -> Iterator ``` ```python @@ -818,7 +818,7 @@ lock.release() Itertools --------- -**Every function returns a generator and can accept any collection. If you want to print an output of generator, as in examples, you need to pass it to the list() function.** +**Every function returns an iterator and can accept any collection and/or iterator. If you want to print the iterator, you need to pass it to the list() function.** ```python from itertools import *