From 2a6b898b868252f62ac539ee9bfa8c88a18ebb7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 24 Dec 2018 15:48:30 +0100 Subject: [PATCH] Counter --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 44cf05b..90f224d 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,8 @@ dict(zip(keys, values)) # Initiates a dict from two lists. ### Counter ```python >>> from collections import Counter ->>> z = ['blue', 'red', 'blue', 'yellow', 'blue', 'red'] ->>> Counter(z) +>>> colors = ['blue', 'red', 'blue', 'yellow', 'blue', 'red'] +>>> Counter(colors) Counter({'blue': 3, 'red': 2, 'yellow': 1}) >>> .most_common()[0][0] 'blue'