I have the following dictionary:
d = {
'A': 50,
'B': 30,
'C': 20
}
Is it possible to find and print all iterations of this dictionary based only on swapping the values?
E.g.
# First iteration
d = {'A': 50, 'B': 30, 'C': 20}
# Second iteration
d = {'A': 50, 'B': 20, 'C': 30}
# Third iteration
d = {'A': 30, 'B': 50, 'C': 20}
...
The values are unique and the order of swapping the values does not matter as long as all possible iterations are found.