import random


def train_test(n, testRatio = 0.20, seed = 1):
    """ Train/test split (returns list of indices) 
        Returns indices of train,test samples
    """
    random.seed(seed)
    nts = int(n * testRatio)
    idx = random.sample(range(n), n)
    idx_ts, idx_tr = idx[:nts], idx[nts:]

    return idx_ts, idx_tr