Skip to content

Instantly share code, notes, and snippets.

mans_agreements = {} # 假设 agreement 比较大
for a in agreement:
mans_agreements.setdefault(a['agent_name'], [])
mans_agreements[a['agent_name']].append(a)
for man in agentman:
his_agreements = mans_agreements.get(man['agent_name'], [])
for a in his_agreements:
print(dict(man, **a))