(inventory)
Print contents and total number of items in inventory.
Print contents and total number of items in inventory.
Print contents and total number of items in inventory .
def display_inventory(inventory):
    """Print contents and total number of items in inventory."""
    print('Inventory:')
    item_total = 0
    for k, v in inventory.items():
        print(str(v) + ' ' + k)
        item_total += v
    print('Total number of items : ' + str(item_total))
def display_inventory ( inventory ) : print ( 'Inventory:' ) item_total = 0 for k , v in inventory . items ( ) : print ( str ( v ) + ' ' + k ) item_total += v print ( 'Total number of items : ' + str ( item_total ) )