Workout #32: Flip a Dict
Oct 20, 2021
For this exercise, first create a dict of any size, in which the keys are unique and the values are also unique. (A key may appear as a value, or vice versa.) Here’s an example:
d = {'a':1, 'b':2, 'c':3}
Turn the dict inside out, such that the keys and the values are reversed.
TRY IT YOURSELF
ANSWER
https://colab.research.google.com/drive/1qeJyp3AmDOc5S6DLEZSyPjRdlSvXtjOF?usp=sharing