一行代码合并两个字典
dic_1 = {'a':111,'b':222}
dic_2 = {'c':333,'d':444}
dic = {**dic_1,**dic_2}
print(dic)
# {'a': 111, 'b': 222, 'c': 333, 'd': 444}
{**字典名,**字典名2} 进行合并字典
2020-05-07
本文来自博客园,作者:CodeYaSuo,转载请注明原文链接:https://www.cnblogs.com/hany-postq473111315/p/12845131.html