Skip to content

Instantly share code, notes, and snippets.

@MHMDhub
Created August 14, 2016 19:50
Show Gist options
  • Save MHMDhub/15d27ba4ed7b1a861f92a33c499a7875 to your computer and use it in GitHub Desktop.
Save MHMDhub/15d27ba4ed7b1a861f92a33c499a7875 to your computer and use it in GitHub Desktop.
Merge two Python dictionaries
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