Run
my_dict = { 'foo':12, 'bar':14 } swapped_dict = {value: key for key, value in my_dict.items()} print(swapped_dict)
Output