Last active
April 4, 2018 12:49
-
-
Save JayH5/95942d3614497fb2abb307046c4a6320 to your computer and use it in GitHub Desktop.
Python example: Dictionary merging
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
def merge_dicts(dict1, dict2): | |
merged_dict = dict1.copy() | |
merged_dict.update(dict2) | |
return merged_dict |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment