Skip to content

Instantly share code, notes, and snippets.

@hugobast
Created March 17, 2014 16:09
Show Gist options
  • Save hugobast/9602289 to your computer and use it in GitHub Desktop.
Save hugobast/9602289 to your computer and use it in GitHub Desktop.
Merging dict
a_dict = {"a": 1, "b": 2, "c": 3}
another_dict = {"b": 3, "d": 4}
dict(a_dict, **another_dict)
# worth a read http://sahandsaba.com/thirty-python-language-features-and-tricks-you-may-not-know.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment