A dictionary assignment updates the existing dictionary. Start with stock.copy() when the caller still needs the old quantities.
A designer makes a one-off copy of the default colors.
defaults = {"ink": "black", "paper": "white"}
flyer = defaults.copy()
flyer["ink"] = "blue"
print(defaults["ink"], flyer["ink"]) # black blueAssigning a color on the copy preserves the default. To update a quantity, read the previous value before assigning the new one.
Return an updated copy of stock with amount added to item. A new item starts at zero. Preserve every other stock quantity and the original dictionary.
receive({"pen": 2}, "pen", 3) # {"pen": 5}