問題:
What would be a nice way to go from {2:3, 1:89, 4:5, 3:0}
to {1:89, 2:3, 3:0, 4:5}
?從{2:3, 1:89, 4:5, 3:0}
到{1:89, 2:3, 3:0, 4:5}
什麼?
I checked some posts but they all use the "sorted" operator that returns tuples.我檢查了一些帖子,但它們都使用返回元組的“排序”運算符。
解決方案:
參考一: https://en.stackoom.com/question/blhd參考二: https://stackoom.com/question/blhd