Created
August 14, 2016 19:50
-
-
Save MHMDhub/15d27ba4ed7b1a861f92a33c499a7875 to your computer and use it in GitHub Desktop.
Merge two Python dictionaries
This file contains hidden or 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
x = {'a':1, 'b': 2} | |
y = {'c':10, 'd': 11} | |
z = dict(x.items() + y.items()) | |
z | |
{'a': 1, 'b':2, 'c': 10, 'd': 11} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment