Created
August 9, 2016 23:01
-
-
Save Gwith/d824b79f01e823339831783706fdbaa2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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