13

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:

you are viewing a single comment's thread
view the rest of the comments
[-] gigachad@piefed.social 2 points 3 days ago

Why can't it just return the result but has to use the same names in both scopes, I hate it

It's a nice exercise and a cool visualization though

[-] bterwijn@programming.dev 1 points 3 days ago

The whole point is to practice Python Data Model concepts, it's not a best-way-to-code example, so feel free to hate.

this post was submitted on 09 Oct 2025
13 points (72.4% liked)

Python

7508 readers
2 users here now

Welcome to the Python community on the programming.dev Lemmy instance!

📅 Events

PastNovember 2023

October 2023

July 2023

August 2023

September 2023

🐍 Python project:
💓 Python Community:
✨ Python Ecosystem:
🌌 Fediverse
Communities
Projects
Feeds

founded 2 years ago
MODERATORS