Python Basics: Understanding Assignment, Shallow Copy, and Deep Copy for Strings and Lists
This note explains how Python variable assignment creates references, demonstrates the differences between shallow and deep copying of lists, and provides concrete code examples showing how modifications affect original and copied objects for both one‑dimensional and multi‑dimensional lists.
