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
Post a Comment