I have a dictionary, where each key maps to an array. I want to sort the dictionary based on the highest value in the array of each key.
For example, the dictionary:
{'r': [2, 2], 'e': [4, 5], 't': [1, 1], 'h': [2, 2], 'y': [1, 2], 's': [0, 1], 'a': [0, 1]}
should become:
{ 'e': [4, 5], 'h': [2, 2], 'y': [1, 2], 'r': [2, 2], 't': [1, 1], 's': [0, 1], 'a': [0, 1]|