from collections import OrderedDict
dictionary = {"Charlie": [[7]], "Alex": [[4]], "Brandon": [[8]]}
OrderedDict(sorted(dictionary.items(), key=lambda x: x[0]))
print(dictionary)
Okay I am trying to order my dictionary by the key, in alphabetical order, but the dictionary doesn't change order after the 3rd line of code as seen above. Can anyone help me with a solution?