Skip to content

Commit b9b7b0c

Browse files
committed
List
1 parent 485172d commit b9b7b0c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ List
3333
```
3434

3535
```python
36-
sum_of_elements = sum(<list>)
36+
sum_of_elements = sum(<collection>)
3737
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]))
4040
flattened_list = list(itertools.chain.from_iterable(<list>))
4141
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>)
4343
no_duplicates = list(dict.fromkeys(<list>))
4444
```
4545

0 commit comments

Comments
 (0)