human
I would like to have an inventory in ren'py could you give me a model for storing the items and functions for behaviour for removing and adding items.
gpt
Of course! In Ren'Py, you can create an inventory system using Python lists and dictionaries. Here's a basic model for an inventory system that includes functions for adding and removing items:

Create a file named inventory.rpy in your Ren'Py project folder.
Paste the following code into the inventory.rpy file:
```
init python:
    class Item(object):
        def __init__(self, name, description):
            self.name = name
            self.description = description

    # Define your items
    item_apple = Item("Apple", "A delicious red apple.")
    item_key = Item("Key", "A small, rusty key.")

    # Inventory list
    inventory = []

    # Function for adding items
    def add_item(item):
        if item not in inventory:
            inventory.append(item)
            return True
        else:
            return False

    # Function for removing items
    def remove_item(item):
        if item in inventory:
            inventory.remove(item)
            return True
        else:
            return False

    # Function for checking if an item is in the inventory
    def has_item(item):
        return item in inventory