Say you're creating an inventory management system.
You're given 2 lists of dictionaries: One representing what we currently have in inventory (l1), and the other representing what comes in with a new shipment (l2).
l1 = [{"product_id": 0, "quantity": 9}, {"product_id": 1, "quantity": 18}, {"product_id": 2, "quantity": 22}]
l2 = [{"product_id": 0, "quantity": 30}, {"product_id": 1, "quantity": 25}, {"product_id": 2, "quantity": 25}]
How would we add the quantities of these lists together so we get something like:
l3 = [{"product_id": 0, "quantity": 39}, {"product_id": 1, "quantity": 43}, {"product_id": 2, "quantity": 47}]