I'm writing a practice program to add items from a list to a existing dictionary
def addToInventory(inventory, addedItems):
for i in addedItems:
inventory[i] = inventory.get(i,0) + 1
stuff = {'gold coin': 42, 'rope': 1}
loot = ['gold coin', 'dagger', 'gold coin', 'gold coin', 'ruby']
stuff = addToInventory(stuff, loot)
Why is stuff changed to None after running this?