问题:
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