I have a tuple with data like
results = ((a, b, c, d), (1, 2, 3, 4), (q, w, e, r))
I need 1st, 2nd and 3rd element in different lists like:
one = [a, 1, q]
two = [b. 2, w]
thr = [c, 3, e]
I am doing it like:
one = [r[0] for r in results]
two = [r[1] for r in results]
thr = [r[2] for r in results]
But I feel there would be a way to do this in a single line instead of three loops.
Other way I could think of is like
for r in results:
one.append(r[0])
two.append(r[1])
thr.append(r[2])
Is there any other better solution?