def remove_key(key):
    """Given a dictionary, return a new dictionary with 'key' removed.
    >>> remove_key("two")({"one": 1, "two": 2, "three": 3})
    {'one': 1, 'three': 3}
    """

    def remove_key(d: dict):
        updated = d.copy()
        del updated[key]
        return updated

    return remove_key