【发布时间】:2021-09-15 13:25:57
【问题描述】:
我有以下词典列表
[
{"Control":"[check11] Enable MFA", "Message":"account x1"},
{"Control":"[check11] Enable MFA", "Message":"account x2"},
{"Control":"[check12] Rotate keys", "Message":"account x1"},
{"Control":"[check12] Rotate keys", "Message":"account x2"}
]
我想为“控件”和所有控件“消息”获取唯一值,所以它看起来像这样
[
["[check11] Enable MFA", "account x1", "account x2"],
["[check12] Rotate keys", "account x1", "account x2"]
]
如果有人对如何使其工作有任何想法,我将非常感谢您的提示。
【问题讨论】:
标签: python json python-3.x list dictionary