Skip to content

Instantly share code, notes, and snippets.

@crystalattice
Created April 1, 2018 19:23
Show Gist options
  • Save crystalattice/695d302a35d39f6b66b6e2ba0b42eb5f to your computer and use it in GitHub Desktop.
Save crystalattice/695d302a35d39f6b66b6e2ba0b42eb5f to your computer and use it in GitHub Desktop.
d1 = {"a":1, "b":2, "c":3}
d2 = {"x":4, "y":5, "z":6}
for key in d1:
d2[key] = d1[key]
# print(d2)
#{'x': 4, 'y': 5, 'z': 6, 'a': 1, 'b': 2, 'c': 3}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment