pair lists to create tuples in order

后端 未结 7 1874
不知归路
不知归路 2020-12-29 03:41

I\'d like to combine two lists. If I have the following two lists: {a,b,c,d} and {1,2,3,4} what do I need to do so that I get {{a,1}, {b,2},

7条回答
  •  庸人自扰
    2020-12-29 03:52

    listA={a,b,c,d};
    listB=[1,2,3,4};
    table=Transpose@{# & @@@ listA, # & @@@ listB}
    

提交回复
热议问题