Creating an inventory using a list and KeyValuePairs

Could anyone walk we through how to create a script that allows for the creation of an inventory using a list. It must have six slots available at the start and and new slot is added if an item is picked up and there is no free slots, with a max of twelve. Slots must also be taken away if an item is used up, but it cant go under the minimum of 6 slots. I would love to work this with someone and if someone wouldn’t mind explaining KeyPairValues too.

Hi you can create a dictionary with key value pairs and make the dictionary as list and you can add or remove based on your logic.

you can google how to use dictionary as list.