White RoomNEW White Room DSA

Shallow Copy Stops At One Level

import copy

board = [[1, 2], [3, 4]]
shallow = board.copy()
deep = copy.deepcopy(board)

shallow[0].append(99)
deep[1].append(100)

print(board)
print(shallow)
print(deep)

What does this print?