Created
March 17, 2014 16:09
-
-
Save hugobast/9602289 to your computer and use it in GitHub Desktop.
Merging dict
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_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