Why does list index reassignment of a copied-two-dimensional list in python affects the original list?

I tried this

ori = [[1,2,3],[4,5,6]]
temp = ori.copy()
temp[0][0] = 200

Result of print ori

[[200, 2, 3], [4, 5, 6]]

But assisgning a value one-dimensionally leaves the ori intact, like so

temp[0] = 200

Ori remains


But temp becomes


The above does not seem to change the ori.

Please why is it so and how do I go about modifying a copied list two-dimensionally in python?

I even tried .append() on temp two-dimensionally and it still affected ori.


seems .copy() makes a shallow copy by default:


seems you want deepCopy


Yeah, thanks. I have been able to get around it with deepcopy.