Skip to content

Instantly share code, notes, and snippets.

@c0ldlimit
Last active October 12, 2015 21:27
Show Gist options
  • Save c0ldlimit/4089136 to your computer and use it in GitHub Desktop.
Save c0ldlimit/4089136 to your computer and use it in GitHub Desktop.
Python: Append Dict to Dict #python #dict #append
# append dict extra to dict orig
orig.update(extra)
# make new dict with blend of both
dest = dict(orig) # or dict(**orig) or dict.copy()
dest.update(extra)
# Reference:
# http://stackoverflow.com/questions/8930915/python-append-dictionary-to-dictionary
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment