A dictionary contains the pair of the keys & values (represents key : value), a dictionary is created by providing the elements within the curly braces ({}), separated by the commas.
Here, we have a dictionary and two values whose position is to be swapped.
Program to swap the position of dictionary items
Output:
need an explanation for this answer? contact us directly to get an explanation for this answer