📜  在 python 代码示例中合并字典

📅  最后修改于: 2022-03-11 14:45:58.103000             🧑  作者: Mango

代码示例2
dict_1 = {'John': 15, 'Rick': 10, 'Misa' : 12 }
dict_2 = {'Bonnie': 18,'Rick': 20,'Matt' : 16 }
dict_1.update(dict_2)
print('Updated dictionary:')
print(dict_1)