A shop's Inventory keeps its stock in a dictionary that maps item names to quantities.
Part 1: Inventory()
A new inventory has an empty dictionary in stock.
add(item, quantity) adds to that item's quantity. A new item starts from 0.remove(item, quantity):
quantity of it, change nothing and return False,True. If an item's quantity drops to 0, delete it from stock.count(item) returns how many of that item there are. An item that isn't stocked gives 0.__repr__ returns Inventory(name=qty, name=qty) with items in alphabetical order, separated by ", ". An empty inventory is Inventory().Part 2: stock_report(moves)
Make an inventory. moves is a list of (action, item, quantity) tuples, where action is "add" or "remove". Apply them in order. Return [str(inventory), number of failed removes].