I am trying to make an inventory program to use in an RPG. The program needs to be able to add and remove things and then add them to a list. This is what I have so far:
That's not how to add an item to a string. This:
newinv=inventory+str(add)
Means you're trying to concatenate a list and a string. To add an item to a list, use the list.append() method.
list.append()
inventory.append(add) #adds a new item to inventory print(inventory) #prints the new inventory
Hope this helps!