Skip to content

Instantly share code, notes, and snippets.

@kirang89
Created April 24, 2013 20:34
Show Gist options
  • Save kirang89/5455352 to your computer and use it in GitHub Desktop.
Save kirang89/5455352 to your computer and use it in GitHub Desktop.
Merging 2 dicts
#!/usr/bin/env python
d1 = dict(a=1, b=2, c=3)
d2 = dict(d=4, e=5, d=6)
dict_new = dict(d1, **d2)
print dict_new
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment