python take dictionary and change values code example Example: how to change key to value and versa in python dictionary dict = {value:key for key, value in dict.items()}