I have a set of lists:
A = [[A1,A2,A3],[A4,A5,A6]...,[A(n-2),A(n-1),A(n)]] #A has length n
B = [[B1,B2,B3],[B4,B5,B6]...,[B(n-2),B(n-1),B(n)]] #B has length n
C = [[C1,C2,C3],[C4,C5,C6]...,[C(n-2),C(n-1),C(n)]] #C has length n
and I want to sort it into the following format:
f = [(A1,A2,A3,B1,B2,B3,C1,C2,C3),(A4,A5,A6,B4,B5,B6,C4,C5,C6),...,(A(n-2),A(n-1),A(n),B(n-2),B(n-1),B(n),C(n-2),C(n-1),C(n))]
I'm pretty new to python and I cant think of a way to do this.
Any input will be greatly appreciated.
Ive started by using:
for item in range(len(A)):
f[item][0] = A[item][0]
f[item][1] = A[item][1]
f[item][2] = A[item][2]
for item in range(len(B)):
f[item][3] = B[item][0]
f[item][4] = B[item][1]
f[item][5] = B[item][2]
for item in range(len(C)):
f[item][6] = C[item][0]
f[item][7] = C[item][1]
f[item][8] = C[item][2]
But this just sets all items in the list f to be equal to the last item in f for some reason.