我正在尝试将列表转换为字典。我尝试了很多解决方案,但找不到完全像这样的方法python dict 是 python 中最好的东西之一,所以我需要 Dict我有一个这样的大 list
[{
'1': {
'1.1': '',
'1.2': '',
'1.3': False
}
}, {
'2': {
'2.1': False
}
}, {
'3': {
'3.1': [100, 91, 100, 100],
'3.2': 5,
'3.3': True,
'3.5': ['Page has no headings', 'This form element has no label.', 'This link has no text inside it.', 'This link text is uninformative.'],
'3.6': 4
}
}, {
'4': {
'4.1': False,
'4.2': False,
'4.3': True
}
}, {
'5': {
'5.1': True,
'5.2': '"2021-12-14 19:00:42"',
'5.3': True
}
}]
我只想要这样的字典
final_result ={
'1': {
'1.1': '',
'1.2': '',
'1.3': False
}
'2': {
'2.1': False
}
'3': {
'3.1': [100, 91, 100, 100],
'3.2': 5,
'3.3': True,
'3.5': ['Page has no headings', 'This form element has no label.', 'This link has no text inside it.', 'This link text is uninformative.'],
'3.6': 4
}
'4': {
'4.1': False,
'4.2': False,
'4.3': True
}
'5': {
'5.1': True,
'5.2': '"2021-12-14 19:00:42"',
'5.3': True
}
}
我尝试了一些方法,但我今天过得很糟糕,所以无法找到解决方案
谢谢
我是一名优秀的程序员,十分优秀!