diff options
author | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-20 09:14:53 +0000 |
---|---|---|
committer | Fudgerboy <91767657+Fudgerboy@users.noreply.github.com> | 2024-05-20 09:14:53 +0000 |
commit | 70fad594167f798b826b580546da1f3934986667 (patch) | |
tree | 6190bd0dcade7fea41ab3b969ce21db968a9ed1a | |
parent | af45c563be4e7cfa6d5e003a7470ec024d0a4bcd (diff) |
Mon, May 20, 2024, 2:14 AM -07:00
-rw-r--r-- | wk7/lect/favorites.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wk7/lect/favorites.py b/wk7/lect/favorites.py index 446a92e..62ce6c6 100644 --- a/wk7/lect/favorites.py +++ b/wk7/lect/favorites.py @@ -16,6 +16,6 @@ with open("favorites.csv") as file: else: counts[favorite] = 1 -for favorite in counts: +for favorite in sorted(counts, key=counts.get): print(favorite, ':', counts[favorite]) |