I am trying to sort a dictionary of dictionaries. My dictionary looks like this, except there are about several million more entries with varying usernames, dates, and numbers:
{'RandomUserName': defaultdict(<type 'int'>, {'6/30/15': 2}),
'AnotherRandomUserName': defaultdict(<type 'int'>, {'5/25/16': 8}),
'AThirdRandomUserName': defaultdict(<type 'int'>, {'1/12/15': 5})}
I want to sort this dictionary based on the numbers at the end of the entries. I know it is impossible to sort a dictionary and that you can only return a sorted representation. That is exactly what I am trying to do.
I have been looking around for answers on how to sort dictionary within dictionary but all the answers assume we know the key before the value. What if we don't? How can I sort this based on the integer at the end?
Thanks so much, I appreciate any answers!