How Python Code Complete Merger append two dictionaries

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/iCloudEnd/article/details/99687579

How Python Code Complete Merger append two dictionaries

>>> d1 = {1: 1, 2: 2}
>>> d2 = {2: 'ha!', 3: 3}
>>> d1.update(d2)
>>> d1
{1: 1, 2: 'ha!', 3: 3}

More exciting please pay attention to my column Code

Guess you like

Origin blog.csdn.net/iCloudEnd/article/details/99687579