I am trying to create and append a list and index in a list. Appending any list element is being automatically appended to all the lists available in this list First of all I have a list as following
sygma_list [[]] * 3
and I have another lists having the form
mts_columns1 = [[1,2,3], [4,5,6], [6,7,8]]
mts_columns2 = [[1,2,3], [4,5,6], [6,7,8]]
When looping over the sygma_list I have like so:
for i in range(0, 3):
sygma_list[i].append(mts_column[i])
the results of sygma_list are being quite shocking, as append() is behaving on each element of the list instead of obtaining a final result of
sygma_list = [[[1,2,3], [1,2,3]],
[[4,5,6],[4,5,6]],
[[6,7,8],[6,7,8]]]