From 3833414103364ce6d573f375f70a23011621bffe Mon Sep 17 00:00:00 2001 From: Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> Date: Mon, 20 May 2024 09:23:34 +0000 Subject: Mon, May 20, 2024, 2:23 AM -07:00 --- wk7/lect/favorites.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'wk7/lect/favorites.py') diff --git a/wk7/lect/favorites.py b/wk7/lect/favorites.py index 68fa769..e252de8 100644 --- a/wk7/lect/favorites.py +++ b/wk7/lect/favorites.py @@ -15,5 +15,5 @@ with open("favorites.csv") as file: favorite = row["language"] counts[favorite] += 1 -for favorite, count in counts.most_common(): - print(f"{favorite}: {count}") +favorite = input("Favorite: ") +print(f"{favorite}: {counts[favorite]}") -- cgit v1.2.3