python: append only specific elements from a list -


i have list of list:

b=[[1,2,3],[4,5,6],[7,8,9]] 

i have list:

row = [1,2,3] 

how append b row[0] , '3847' , row[2] such b equal:

b=[[1,2,3],[4,5,6],[7,8,9],[1,3847,3]] 

you're going have more specific.

this accomplish want:

b.append([row[0], 3847, row[2]]) 

but isn't general solution.


Comments

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -