I have a list of list and I would like to add an element inside only one of the list but it is added everywhere. You can find my code bellow
repartition_labels = [[]]*3
repartition_labels[2].append(2)
The result I have is
[[2], [2], [2]]
and I would like to have the result
[[], [], [2]]
I already tried to function insert and extend but it didn't solve the problem