- 3
Sort a dictionary in alphabetical order by the value, and print.
1. Sorting Dictionaries: • Create a dictionary of 20 humans and their pets (name of human is the key, and name of pet is the value). • Sort the dictionary in alphabetical order by the key, and print. • Sort the dictionary in alphabetical order by the value, and print.
2 Réponses
+ 4
I see that you seem to be asking how to sort a dictionary only by the value, but the task 1st requires you to sort by the key and then again by the value. Where is your coded attempt? Depending on how/if you coded the 1st sorted part by the key, you may be able to sort by value in a similar way. Share your attempt and we can help you further.
+ 3
This looks like homework!
Do you have an attempt to post with your query?