How can we sort a dictionary in python using the internal state of the value?
For example:
myDict = {'a': {'day': [0, 1, 2, 5], 'week': [4, 3, 1, 2, 3]},
'b': {'day': [0, 6, 2, 5], 'week': [4, 3, 1, 2, 3]}}
I want to sort the dictionary keys by the second value of the day list for their corresponding value dictionaries.