@@ -39,7 +39,7 @@ sorted_by_second = sorted(<list>, key=lambda el: el[1])
39
39
sorted_by_both = sorted (< list > , key = lambda el : (el[1 ], el[0 ]))
40
40
flattened_list = list (itertools.chain.from_iterable(< list > ))
41
41
list_of_chars = list (< str > )
42
- product_of_elems = functools.reduce(lambda out , x : out * x, < list > )
42
+ product_of_elems = functools.reduce(lambda agr , x : agr * x, < list > )
43
43
no_duplicates = list (dict .fromkeys(< list > ))
44
44
```
45
45
@@ -479,9 +479,9 @@ for i in range(10):
479
479
### Map, Filter, Reduce
480
480
``` python
481
481
from functools import reduce
482
- < iter > = map (lambda x : x + 1 , range (10 )) # (1, 2, ..., 10)
483
- < iter > = filter (lambda x : x > 5 , range (10 )) # (6, 7, ..., 9)
484
- < any_type> = reduce (lambda sum , x : sum + x, range (10 )) # 45
482
+ < iter > = map (lambda x : x + 1 , range (10 )) # (1, 2, ..., 10)
483
+ < iter > = filter (lambda x : x > 5 , range (10 )) # (6, 7, ..., 9)
484
+ < any_type> = reduce (lambda agr , x : agr + x, range (10 )) # 45
485
485
```
486
486
487
487
### Any, All
0 commit comments