How can I order the values for my dictionary?
sorted_activities = sorted(activity_dicc.items(),reverse=True)
for activity,duration in sorted_activities :
print(activity,duration)
activity_dicc is my dictionary, activity is the key and duration is the value.
When I run my code, it is not sorted. I hoped for it to appear in order by the duration going from highest to lowest.
(The code is way too long to show, but that's the part with the issue. I need to set up a place so it knows how to sort it by, but I'm not sure where to do that.)