Created
July 6, 2019 06:19
-
-
Save eyaltrabelsi/d6eb52da11ba07243e9f2118d48a8402 to your computer and use it in GitHub Desktop.
Python trick merge two dictionaries
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> a = {"a":1, "b":1} | |
>>> b = {"b":2, "c":1} | |
>>> a.update(b) | |
>>> a | |
{"a":1, "b":2, "c":1} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment