Total stock
stock maps item names to quantities. Write total_stock(stock) that
returns the sum of all the quantities.
total_stock({"apple": 10, "bread": 3}) -> 13
total_stock({}) -> 0
def total_stock(stock):
...
stock maps item names to quantities. Write total_stock(stock) that
returns the sum of all the quantities.
total_stock({"apple": 10, "bread": 3}) -> 13
total_stock({}) -> 0
def total_stock(stock):
...