Skip to content

Instantly share code, notes, and snippets.

@Gwith
Created August 9, 2016 23:01
Show Gist options
  • Select an option

  • Save Gwith/d824b79f01e823339831783706fdbaa2 to your computer and use it in GitHub Desktop.

Select an option

Save Gwith/d824b79f01e823339831783706fdbaa2 to your computer and use it in GitHub Desktop.
test1 = { 'cat' : 1, 'dog' : 1, 'bird' : 1}
test2 = { 'cat' : 3, 'dog' : 2, 'cow' : 2 }
for key in test2.items():
test1[key] = test1[key] + test2[key]
print(test1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment