How to make inventory system
How do you make an inventory system in Python? I’m thinking of having the inventory only contain 1 item in the start, like the fists. But then, as the character progresses in the game, they can get more items.
So the question is, first of all, how do you make that inventory, and second of all, how would you add items inside that inventory, and third of all, how do you print the item that the user can choose with an input (so like i would show what items they have, and the user then choose out of the items which one they want to use)
Please bear in mind I am a kinda intermediate coder, so I might require you to explain.
Thank you very much in advance!
Here is a less complicated version (For me, Im kinda a noob)
Inventory = ["Item 1"] #when character gets item Inventory.append("Item 2") print(Inventory) #character picks item choice = input("Which Item do you choose?:") if choice == 'Item 1': print("You chose item 1") elif choice == 'Item 2': print("Item 2")