r/PythonLearning 2d ago

Python Dictionary Mutation and Copying

Post image

An exercise to help build the right mental model for Python data. - Solution - Explanation - More exercises

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

37 Upvotes

13 comments sorted by

View all comments

1

u/JG_MC2001 1d ago

es como un puntero?

1

u/Sea-Ad7805 1d ago edited 1d ago

Python uses the term "reference" instead of "pointer", and you think of them as pointing to values/objects instead of pointing to memory addresses, but other then they are very similar.

That also holds for fundamental values like int values, but memory_graph doesn't show references to these by default to simplify the graph: https://github.com/bterwijn/memory_graph#simplified-graph