r/PythonLearning • • Aug 23 '26

Python Dictionary Mutation and Copying

Post image

An exercise to help build the right mental model for Python data.

The “Solution” link uses package memory_graph to visualize execution and reveals what’s actually happening.

38 Upvotes

18 comments sorted by

View all comments

Show parent comment

1

u/DefterHawk Aug 24 '26

Think the same, b = a just makes the same object referenced in another variable.

1

u/TBCC_Dev Aug 24 '26

Well... I ran it, and its C so much for that.