Skip to content

Instantly share code, notes, and snippets.

@moshekaplan
Created August 17, 2014 15:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save moshekaplan/013ccf140fa535424d13 to your computer and use it in GitHub Desktop.
Save moshekaplan/013ccf140fa535424d13 to your computer and use it in GitHub Desktop.
Merge Python dictionaries
def merge_dicts(*dicts):
all_items = []
for dictionary in dicts:
all_items += dictionary.items()
return dict(all_items)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment