So I have a dictionary, with keys and values, and the values are letters. I want to sort the dictionary so that it prints alphabetically according to the values, but I just can't figure out how to go about it.
For example, I have this dictionary:
dict = {5 : 'B', 7 : 'A', 9 : 'C'}
How do I get this to be sorted so that it prints out as follows?:
{7 : 'A', 5 : 'B', 9 : 'C'}