Assignment binds a name to an object; it does not implicitly copy the object.
Background
Python programs operate on objects through names. These examples refresh practical reasoning about values, state, interfaces, and scientific calculations. Run them in a disposable local environment and inspect the result.
Assignment binds a name to an object; it does not implicitly copy the object.
Work through an example
If a = [1, 2] and b = a, then b.append(3) changes the list seen through a as well. Both names refer to the same list. With b = a.copy(), appending to b leaves the outer list a unchanged.
Check the reasoning
A shallow copy does not recursively copy elements. If a contains another list, both outer lists can still refer to that inner list. Distinguish changing an outer slot from mutating an object stored in it.
Practice independently
Create a nested list, make a shallow copy, then mutate an inner element. Draw the references and explain why the result differs from appending a new outer element.
Write down your prediction before consulting the result or revisiting the passage. Explain which observation supports your answer and which part depends on an assumption. Revise the explanation if the evidence does not fit. A useful study note records both the conclusion and the steps another learner would need to check it.
Reference
For the language or library contract, consult the Python language tutorial.
Continue with the course
Explore the curriculum, preparation, and study format for Python Refresher — Course Articles.
Companion article for Python Refresher — Course Articles. Original commentary and examples © 2026 Choral Software. Source literary works retain their own attribution.
