我有一个元组列表,其中每个元组都有许多字典,我想合并为一个(即在每个元组中,只有一个字典)。比如说,
payload = [
(
{"foo1":"value1"},
{"bar1":"value1"}
),
(
{"foo2":"value2"},
{"bar2":"value2"}
)
]
我想要达到的目标是这样的:
payload = [
{"foo1":"value1","bar1":"value1"},
{"foo2":"value2","bar2","value2"}
]