Loading…
At its heart, aliasing in Python is a consequence of the way assignment works. A variable is not a box that holds a value; it is a name bound to an object in memory. When you write b = a, Python does not copy the object that a names; it copies the reference, so both a and b now point to exactly the same object.
You have opened your free Studybank topics for this month.