Answer:
Following are the program in the Python Programming Language:
#set dictionary
d = { 'State' : 'Delhi', 'Country' : 'India'};
#reverse the dictionary.
revers = dict((v, k) for k, v in d.items())
#Displays the reversed dictionary.
print("Dictionary is: \\")
print(revers)
Output:
Dictionary is:
{'Delhi': 'State', 'India': 'Country'}
Step-by-step explanation:
Here, we set the dictionary data type variable "d" then, we set the variable in which we store the reverse of the dictionary in which key is converted into the value and value is converted into the key. and finally we print the reverse dictionary.