程序实现:
a = {1:'a',2:'b',3:'c'} b = {value:key for key,value in a.items()} print(b)
运行结果:
{'a': 1, 'b': 2, 'c': 3}