import copy


def clean(data):
    """
    This function takes a list of lists as an argument, makes a deep copy of the list, and, within the deep copy,
    strips strings of trailing whitespece converted and converts numbers to integers.

    Parameters:
        data (list): A list of lists, each representing a party's election results

    Returns:
        clean_data (list): a list of lists with clean data, each representing a party's election results
    """
    new_data = copy.deepcopy(data)
    for line in new_data[1:]:
        line[0] = line[0].strip()
        line[1] = int(line[1])
        line[2] = line[2].lower().strip()
    return new_data