0
还有就是我有来源:如何在python中创建自定义字典?
"VirtualizationType": "hvm",
"Tags": [
{
"Value": "Test",
"Key": "Name"
}
]
这里有点我的代码:与标签
for item in result:
temp = {"Tags": item["Value"], "VirtualizationType": item["VirtualizationType"]}
output.append(temp)
我可以轻松导出VirtualizationType但couldn`t做
我有循环行驶的问题。无论如何,我试图去.get()“标签”。 –
@ user3729941你应该更多地解释你的问题。 –
香港专业教育学院找到了答案: '高清find_value(标签): 值= “” 如果没有标签:返回值 为标签在标签: VAL = tag.get( “钥匙”,无) 如果val = =“值”: value = tag [“Value”] 返回值# –