我需要对字典列表进行排序以比较数据。
排序前字典
My_dict = {'IndividualDUC':
{'List hardware':
[
{'AMDEVBOS': {'Group': 'Default','Version': 'Not installed'}},
{'ATM0-IT-QAV1': {'Group': 'IT', 'Version': 'Not installed'}},
{'ATM0-PEO-QAV2': {'Group': 'PECO', 'Version': '10.0.40219'}},
{'ATM0-PEO-QAV1': {'Group': 'PECO', 'Version': '10.0.40219'}},
{'MSTQA-ITQA-VM2': {'Group': 'msGrp1', 'Version': '10.0.40219'}},
{'ATM0-IT-QAV2': {'Group': 'IT', 'Version': '10.0.40219'}},
]
},
'DUCPercentages':
{'List hardware':
{'Not installed': {'Percentage': '18.2', 'Count': 2},
'10.0.40219': {'Percentage': '81.8', 'Count': 9}
}
}
}
期望输出:
reuslt = {'IndividualDUC':
{'List hardware':
[
{'AMDEVBOS': {'Group': 'Default','Version': 'Not installed'}},
{'ATM0-IT-QAV1': {'Group': 'IT', 'Version': 'Not installed'}},
{'ATM0-IT-QAV2': {'Group': 'IT', 'Version': '10.0.40219'}},
{'ATM0-PEO-QAV2': {'Group': 'PECO', 'Version': '10.0.40219'}},
{'ATM0-PEO-QAV1': {'Group': 'PECO', 'Version': '10.0.40219'}},
{'MSTQA-ITQA-VM2': {'Group': 'msGrp1', 'Version': '10.0.40219'}},
]
},
'DUCPercentages':
{'List hardware':
{'Not installed': {'Percentage': '18.2', 'Count': 2},
'10.0.40219': {'Percentage': '81.8', 'Count': 9}
}
}
}