In Python I have a dict and want it sorted depending on the order of values matching the keys in the dict that are stored in a list. Assume the following:
value_dict = {"Alpha": "The Alpha", "Beta": "The Beta", "Gamma": "The Gamma"}
key_order = ["Beta", "Gamma", "Alpha"]
So in this case I would like the dict to be sorted so the key "Beta" comes first followed by "Gamma" and then "Alpha".
Any good ideas how I would do that?