print(len(inv['cash']))Is what I wanted. Thank you.
inv = { 'cash': ['gold', 'gold'], } print(inv['cash']) # This prints the 'cash' list print(' '.join(inv['cash'])) # This prints the 'cash' list stripped of brackets and quotes print(len(inv['cash'])) # This counts the number of all items in the 'cash' list and prints it money = inv['cash'] # This assigns the 'cash' list to the money variable print(money.count('gold')) # This counts the number of 'gold' items in the cash list and prints it.I made this. I think I understand it better now.