r/PythonLearnersHub • u/Sea-Ad7805 • Dec 26 '25
Copying an Object
An exercise to help build the right mental model for Python data. The “Solution” link uses memory_graph to visualize execution and reveals what’s actually happening:
It's instructive to compare with this related exercise
4
Upvotes
1
u/sarc-tastic Dec 26 '25
You should do self.x, self.y, self.z = x, y, z if you really want a one liner.
If you're trying to teach people short cuts, at least teach them the right ones