diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-20 09:23:34 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-20 09:23:34 +0000 |
commit | 3833414103364ce6d573f375f70a23011621bffe (patch) | |
tree | fd7c50fd6427efc7e8ba49606836fae667259338 /wk7/lect/favorites.py | |
parent | ce0c71df823cc5d3ebe4f4b6b55a8109bb9a5fc9 (diff) |
Mon, May 20, 2024, 2:23 AM -07:00
Diffstat (limited to 'wk7/lect/favorites.py')
-rw-r--r-- | wk7/lect/favorites.py | 4 |
1 files changed, 2 insertions, 2 deletions
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]}") |