I have a dictionary in python with various numerical elements, each with a string as a key.
Example:
ex_dict = {"text1" : 63 , "text2" : 71 , "text3" : 3}
I was wondering if there was a way for me to sort the elements of the dictionary based on the numerical values for each key; using a function that would output:
sorted_dict = {"text2" : 71 , "text1" : 63 , "text3" : 3}