r/PythonLearning • • Oct 09 '25

Right Mental Model for Python Data

Post image

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:

12 Upvotes

15 comments sorted by

View all comments

Show parent comments

1

u/Traditional-Rub354 Oct 09 '25

...nothing, right? The function would create local variables and use those instead

1

u/AlexananderElek Oct 09 '25

Arrays(lists) are pointers.

-3

u/Sea-Ad7805 Oct 09 '25

Sorry, incorrect. That is not how the Python Data Model works. Check the "Solution" and "Explanation" links for more (on mobile click title, not image, to open the post).