import random


def randomSplit(l,propTrain,propValidate):
    """Create list of indexes to split the data into training, 
    validation, and testing sets.

    Parameters
    ----------
    l : int
        length of the list to
    propTrain : float [0->1]
        proportion of data that should be training data
    propValidate : float [0->1]
        proportion of data that should be validation data
    
    Returns
    -------
    trainInd : List of int
        Indices to use for training data
    valInd : List of int
        Indices to use for validation data
    testInd : List of int
        Indices to use for testing data
    """
    # create list of indexes
    ind = [i for i in range(l)]
    random.shuffle(ind)
    b1 = round(propTrain*len(ind))
    b2 = round((propTrain+propValidate)*len(ind))
    trainInd = ind[:b1]
    valInd = ind[b1:b2]
    testInd = ind[b2:]
    return trainInd,valInd,testInd