From 33683bdbdbfdaa7654ed15bab019d51c00a8e8f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sun, 27 Jan 2019 16:29:22 +0100 Subject: [PATCH] Counter --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4458c6c..22df7de 100644 --- a/README.md +++ b/README.md @@ -83,9 +83,9 @@ value = .pop(key) # Removes item from dictionary. ```python >>> from collections import Counter >>> colors = ['blue', 'red', 'blue', 'yellow', 'blue', 'red'] ->>> Counter(colors) +>>> counter = Counter(colors) Counter({'blue': 3, 'red': 2, 'yellow': 1}) ->>> .most_common()[0][0] +>>> counter.most_common()[0][0] 'blue' ``` @@ -134,7 +134,7 @@ to_exclusive = .stop Enumerate --------- ```python -for i, in enumerate( [, i_start]): +for i, element in enumerate( [, i_start]): ... ```