Hi I want to copy a 2D list, so that if I modify 1 list, the other is not modified.
For 1 D list, I just do this:
a = [1,2]
b = a[:]
And now if I modify b, a is not modified.
But this doesn't work for 2D list:
a = [[1,2],[3,4]]
b = a[:]
If I modify b, a gets modified as well.
How do I fix this?