22
Question Question 16
Fill in the blanks of the following code so that the values and keys of dictionary d are inverted to create dictionary fd.
d = {'a':1, 'b':2, 'c':3}
print(d)
fd = {}
for key, value in d.____():
fd[____] = ____
print(fd)- items
- value
- key
The completed program is given below for reference:
d = {'a':1, 'b':2, 'c':3}
print(d)
fd = {}
for key, value in d.items():
fd[value] = key
print(fd)