Appending to the rows of a table

前端 未结 7 1857
南方客
南方客 2020-12-05 08:25

I have a two dimensional list and a one dimensional list. I would like to insert the 1D list into the 2D list as an additional column. For example:

array = {         


        
7条回答
  •  旧巷少年郎
    2020-12-05 09:00

    Though not as practical or efficient as some of the extant methods, here are two more to add to the list:

    ArrayPad[array, {0,{0,1}}, List /@ column]
    
    PadRight[array, Dimensions[array] + {0, 1}, List /@ column]
    

提交回复
热议问题