我想知道如何在 python3 中通过“col”asc 来排序。尝试排序和 orderDict。
d = {0: {'m1': 32, 'M1': 174, 'm2': 190, 'M2': 967, 'col': 6, 'cols': [2, 6, 11, 14, 15, 16, 18]},
1: {'m1': 50, 'M1': 580, 'm2': 588, 'M2': 960, 'col': 10, 'cols': [2, 6, 7, 10, 11, 14, 15, 16, 17, 18, 19]},
2: {'m1': 35, 'M1': 595, 'm2': 621, 'M2': 972, 'col': 8, 'cols': [2, 6, 10, 11, 14, 15, 16, 18, 19]},
3: {'m1': 41, 'M1': 85, 'm2': 104, 'M2': 962, 'col': …Run Code Online (Sandbox Code Playgroud)