File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 33
33
```
34
34
35
35
``` python
36
- sum_of_elements = sum (< list > )
36
+ sum_of_elements = sum (< collection > )
37
37
elementwise_sum = [sum (pair) for pair in zip (list_a, list_b)]
38
- sorted_by_second = sorted (< list > , key = lambda el : el[1 ])
39
- sorted_by_both = sorted (< list > , key = lambda el : (el[1 ], el[0 ]))
38
+ sorted_by_second = sorted (< collection > , key = lambda el : el[1 ])
39
+ sorted_by_both = sorted (< collection > , 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 out , x : out * x, < collection > )
43
43
no_duplicates = list (dict .fromkeys(< list > ))
44
44
```
45
45
You can’t perform that action at this time.
0 commit comments