I'm trying to reshape tuple array:
x = [(1,2), (5,4), (3,6)]
into two arrays: [1, 5, 3] and [2, 4, 6] in one line
This is working:
a = [x[0] for x in X]
b = [x[1] for x in X]
But this is not working:
(a, b) = [(x[0], x[1]) for x in X]
How can I do it in one line?