# Seperating output as variable

I have an output like this:

out = {{{x1, y1, z1}, {a1, b1, c1}}, {{x2, y2, z2}, {a2, b2, c2}}, {{x3, y3, z3}, {a3, b3, c3}}};


Now want to save this output in two different variables A and B so that I can use it as independent variable

A = {{x1, y1, z1}, {x2, y2, z2}, {x3, y3, z3}}


and

B = {{a1, b1, c1}, {a2, b2, c2}, {a3, b3, c3}}


How can I do that?

• A = out[[All, 1]] and B = out[[All, 2]]. – corey979 Apr 26 '18 at 20:00

{A, B} = Transpose[{{{x1, y1, z1}, {a1, b1, c1}}, {{x2, y2, z2}, {a2,

Transpose flips the list, and then you can directly assign A and B to the two columns in the result. Transpose is very powerful for this sort of manipulation, and it can transpose between several different levels of a list, so I'd recommend checking the documentation on it for more details.