The update() Method for Merging Dictionaries in Python


Merge two dictionaries.

Source Code

additional_info = {"city": "New York", "hobby": "Photography"}
info.update(additional_info)
print(info)
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments