Skip to content

Instantly share code, notes, and snippets.

@Gwith
Created August 8, 2016 20:34
Show Gist options
  • Select an option

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

Select an option

Save Gwith/7bb701ea2755054f866ee8264f9bfb71 to your computer and use it in GitHub Desktop.
def add_to_inventory(inventory, added_items):
inventory['banana'] = 'phone'
inventory[item] = inventory.get(item, 0) + 1
inv = {}
dragonLoot = ['gold coin','dagger','gold coin','gold coin','ruby']
print(add_to_inventory(inv, dragonLoot))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment