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
标签:代码,333,dic,111,一行,444,222,字典
来源: https://www.cnblogs.com/hany-postq473111315/p/12845131.html