def list_to_dict(entries: list, key: str) ->dict:
    """Converts a list of objects of any type into a dictionary, using a specified object parameter as key"""
    dictionary = {}
    for entry in entries:
        current_key = getattr(entry, key)
        dictionary[current_key] = entry
    return dictionary
