As an example, given
A = {a, b, c}
B = {x, y, z}
How do I create?
C = {{a, x}, {b, y}, {c, z}}
As an example, given
A = {a, b, c}
B = {x, y, z}
How do I create?
C = {{a, x}, {b, y}, {c, z}}
SUMMARIZING ALL THE METHODS GIVEN IN THE COMMENTS
Given two lists
A = {a, b, c}
B = {x, y, z}
Each of the following
Transpose[{A, B}]
Thread[{A, B}]
MapThread[List, {A, B}]
Table[{A[[i]], B[[i]]}, {i, 1, Length[A]}]
yield
{{a, x}, {b, y}, {c, z}}
C=Table[{A[[i]], B[[i]]}, {i, 1, 3}]={{a, x}, {b, y}, {c, z}}– Schrodinger Apr 16 '19 at 03:58Transpose[{A,B}]orThread[{A, B}]– OkkesDulgerci Apr 16 '19 at 04:21Transpose[{A, B}]– Rohit Namjoshi Apr 16 '19 at 04:23Transpose, which is the way to go in your case, or did I miss something? p.s. questions marked as duplicate won't be deleted but stay as road signs. – Kuba Apr 16 '19 at 10:02