I have two lists {a, b, c, d, e} and {1, 2, 3, 4, 5}. I want to creat a new list of tuples as follows {{a, 1}, {b, 2}, {c, 3}, {d, 4}, {e, 5}}. Is there a command in Mathematica that allows me to do this?

=================

=================

1 Answer

1

=================

list1 = {a, b, c, d, e};

list2 = {1, 2, 3, 4, 5};

list = Thread@{list1, list2}

{{a, 1}, {b, 2}, {c, 3}, {d, 4}, {e, 5}}

As Kuba states: x = {a,b,c,d,e}; y = {1,2,3,4,5}; Transpose[{x,y}].

– David G. Stork

Jun 12 at 0:06