I built Memory Graph to help students (and myself) build a correct mental model of Python references, mutability, and copying, and to make debugging data structures less “print-driven”. It’s inspired by Python Tutor, but focuses on clearer graphs and on running locally in many different environments and debuggers. The Memory Graph Web Debugger quickly turns your web browser into a Python debugger where the whole program state is visualized in each step, clearly showing aliasing and the structure of the data, giving insight that is hard to get with just printing.
Some interesting examples:
- Recursion, decimal to binary conversion: https://memory-graph.com/#codeurl=https://raw.githubusercont...
- Binary Tree data structure: https://memory-graph.com/#codeurl=https://raw.githubusercont...
- Cocktail Shaker Sort: https://memory-graph.com/#codeurl=https://raw.githubusercont...
Here you can find some difficult Python Data Model exercises for use in education where Memory Graph helps explain the correct answer:
https://github.com/bterwijn/memory_graph_videos/blob/main/exercises/exercises.md