Skip to content

Commit a355a66

Browse files
committed
Random
1 parent 9f9d61f commit a355a66

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -450,9 +450,10 @@ for i in range(10):
450450

451451
### Map, Filter, Reduce
452452
```python
453-
map(lambda x: x + 1, range(10)) # [1, 2, ..., 10]
454-
filter(lambda x: x > 5, range(10)) # [6, 7, ..., 9]
455-
functools.reduce(lambda sum, x: sum+x, range(10)) # 45
453+
from functools import reduce
454+
<iter> = map(lambda x: x + 1, range(10)) # (1, 2, ..., 10)
455+
<iter> = filter(lambda x: x > 5, range(10)) # (6, 7, ..., 9)
456+
<any_type> = reduce(lambda sum, x: sum+x, range(10)) # 45
456457
```
457458

458459
### Any, All

0 commit comments

Comments
 (0)