I have a list of lists like the following:
l = [[[2.04356, 0.799842], 0.940545], [[0.600883, 0.363704], -0.104026], [[-0.150264, -0.0907573], -0.756651]]
I now want to split this list into two lists:
X = [[2.04356, 0.799842],[0.600883, 0.363704],[-0.150264, -0.0907573]]
y = [[0.940545],[-0.104026],[-0.756651]]
I thought either
my_list2, my_list1 = zip(*l)
or
my_list1 = [i[0] for i in l]
my_list2 = [i[1] for i in l]
would work but they don't give me the desired output.