我想使用Python修改这些数据{ "date":<curdate>, "name":["","",""], "id":[",","]}到{ "date":<currdate>, "inputs":{ "name":["","",""], "id":[",","] }}
1 回答
慕尼黑5688855
TA贡献1848条经验 获得超2个赞
只需将字典元素分配给新字典中的适当元素即可。
new_dict = { "date": old_dict["date"],
"inputs": {
"name": old_dict["name"],
"id": old_dict["id"]
}
}
添加回答
举报
0/150
提交
取消