Sorting Python Dictionary Keys Recently I ran into the need to perform more involved operations on Python dictionaries and sorting of ordered lists. This led me to a deeper understanding of a side of the sorted() function that I used to shy away from. The biggest area that I had to learn about was sorting values by a key -- how it works and the practical applications. So the following lines of code are my 'journal' in this little learning journey through dictionary operations and sorting. # Here's a dictionary d that has strings as keys, and a list of integers for each key's value. d = {'m': [23, 42, 63], 'm800': [32, 53, 743, 8], 'm23': [3324,425,21], 'a132': [2, 2, 53, 64]} # Here's a dictionary e that has integers as keys, and a list of integers for each key's value. e = {1: [42, 43, 52], 200: [3, 53, 63, 2], 60: [4, 62, 96], 30: [63, 89], 500: [32]} print d # Result: {'a132': [2, 2, 53, 64], 'm8...