I can't seem to understand following behavior in python:
x = [0, [1,2,3,4,5],[6]]
y = list(x)
y[0] = 10
y[2][0] = 7
print x
print y
It Outputs:
[0, [1, 2, 3, 4, 5], [7]]
[10, [1, 2, 3, 4, 5], [7]]
Why is second index of x and y updated and only the first index of y?
ints