def rearrangeTestData(testData):
    """
    Rearrange a given data set into 3 different lists:
    attribute list, sample list and label list.

    Parameters
    ----------
    testData : list
        A list that represents a data set.

    Returns
    -------
    list
        A list that represents the attribues in the data set.
    list
        A list that represents the samples in the data set.
    list
        A list that represents the labels in the data set.
    """
    
    copyTestData = testData.copy()
    for i in range(len(copyTestData)):
        copyTestData[i] = copyTestData[i].strip().split(',')
    testAttributes = copyTestData[0].copy()
    #Remove the last value which is the lable value
    del testAttributes[-1]
    testSamples = copyTestData.copy()
    #Remove the first line which is the attributes value
    del testSamples[0]
    #Gets all the correct Labels
    testLabels = []
    for s in testSamples:
        testLabels.append(s.pop())
    return testAttributes, testSamples, testLabels