Python:互换字典的键值对 原创 · 1.zip dic = {'a':1, 'b':2, 'c':3} dic_new = dict(zip(dic.values(), dic.keys())) print(dic_new) # {1: 'a', 2: 'b', ...
確定! 回上一頁