inventory = {"apple": 10, "banana": 5}
sales = ["apple", "apple", "banana"]

for i in sales:
    if i in inventory:
        inventory[i] -= 1

print(inventory)


    
    

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: