Created
August 9, 2016 15:59
-
-
Save Gwith/55fb0258cc65afd9b763f118abd1fef8 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
| inv = {'gold coin':42, 'rope':1} | |
| dragonLoot = {'gold coin' : 3, 'dagger' : 1, 'ruby' : 1} | |
| def add_to_inventory(inventory, added_items): | |
| for item in (added_items): | |
| inventory.update(item) | |
| print(inventory) | |
| add_to_inventory(inv, dragonLoot) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment