def retrieve_pendulum_data(filename = "pendulum.dat"):
    """
    Gets pendulum data from filename and outputs a 2d list of
    output[0] = L and output[1] = T
    """
    L_list = []
    T_list = []
    with open(filename, 'r') as infile:
        for line in infile:
            data = line.split()
            try:
                L_list.append(float(data[0]))
                T_list.append(float(data[1]))
            except ValueError:
                pass
            
    infile.close()
    return [L_list, T_list]