From b9b7b0c573d86aba629e34ecfa2f686b740ecd06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Thu, 10 Jan 2019 17:16:59 +0100 Subject: [PATCH] List --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1ab39e0..3e054d0 100644 --- a/README.md +++ b/README.md @@ -33,13 +33,13 @@ List ``` ```python -sum_of_elements = sum() +sum_of_elements = sum() elementwise_sum = [sum(pair) for pair in zip(list_a, list_b)] -sorted_by_second = sorted(, key=lambda el: el[1]) -sorted_by_both = sorted(, key=lambda el: (el[1], el[0])) +sorted_by_second = sorted(, key=lambda el: el[1]) +sorted_by_both = sorted(, key=lambda el: (el[1], el[0])) flattened_list = list(itertools.chain.from_iterable()) list_of_chars = list() -product_of_elems = functools.reduce(lambda out, x: out * x, ) +product_of_elems = functools.reduce(lambda out, x: out * x, ) no_duplicates = list(dict.fromkeys()) ```