Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Concatenation of lists

Suppose I have dispose of two list For the following lists (or any other)

U=[100, 200, 300]
V=[40, 50, 60]
A=[[1,2,3],[4, 5, 6],[7, 8, 9]]

How to append U, V, U and V to A in such a way that the final result be B = [[1,2,3],[4, 5, 6],[7, 8, 9],[100, 200, 300]] or B = [[1,2,3,100],[4, 5, 6,200],[7, 8, 9,300]] or c = [[1,2,3,100],[4, 5, 6,200],[7, 8, 9,300], [40, 50, 60, a]].

for a given. I have the same question with matrix and vectors. And is there a mechanism to go back to list from matrix and vectors ?

Concatenation of lists

Suppose I have dispose of two list For the following lists (or any other)lists:

U=[100, U = [100, 200, 300]
V=[40, V = [40, 50, 60]
A=[[1,2,3],[4, A = [[1, 2, 3], [4, 5, 6],[7, 6], [7, 8, 9]]

How to append U, V, U and V to A in such a way that the final result be to obtain

B = [[1,2,3],[4, [[1, 2, 3], [4, 5, 6],[7, 6], [7, 8, 9],[100, 9], [100, 200, 300]] or B 300]]
C = [[1,2,3,100],[4, [[1, 2, 3, 100], [4, 5, 6,200],[7, 6, 200], [7, 8, 9,300]] or c 9, 300]] 
D = [[1,2,3,100],[4, [[1, 2, 3, 100], [4, 5, 6,200],[7, 6, 200], [7, 8, 9,300], 9, 300], [40, 50, 60, a]]a]]  `.

for a given a.

for a given. I have the same question with matrix matrices and vectors. vectors.

And is there a mechanism to go back to list lists from matrix matrices and vectors ? vectors?

Concatenation of lists

Starting from a list of lists and some extra lists, I want to combine them in various ways.

Suppose I have the following lists:

  • a list of lists

    A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
    
  • two extra lists

    U = [100, 200, 300]
    V = [40, 50, 60]
    A = [[1, 2, 3], [4, 5, 6], [7, 8, 9]]
    

How to append U and V to A extend A using U and V to obtain

B = [[1, 2, 3], [4, 5, 6], [7, 8, 9], [100, 200, 300]]
C = [[1, 2, 3, 100], [4, 5, 6, 200], [7, 8, 9, 300]] 
D = [[1, 2, 3, 100], [4, 5, 6, 200], [7, 8, 9, 300], [40, 50, 60, a]]  `.
a]]

for a given a.

I have the same question with matrices and vectors.

And is there a mechanism to go back to lists from matrices and vectors?