I'm trying to use this code to change sublist value:
sublist = [[1],[1],[1],[]]
list = [sublist,sublist]
print(list)
for i in range(0,2):
list[0][i] = []
print(list)
And in output I see this:
[[[1], [1], [1], []], [[1], [1], [1], []]]
[[[], [], [1], []], [[], [], [1], []]]
How to change only value of list[0] without changing of the other list elements? Thanks.