If I have a dictionary dict1 = {1:'a', 2:'c', 'd':'gh'}
and I want to reverse it so that dict2 = {'d':'gh', 2:'c', 1:'a'}. I do not want to change the maping of the dictionary.
I an doing this in python 3.7, which preserves element order in dictionaries. Is there a function that would do this or what code would allow me to do this.