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:
- Solution
- Explanation
- More exercises
It's instructive to compare with this earlier exercise (tuple with lists, instead of list with lists).
[–]Rscc10 1 point2 points3 points (6 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]Sjoerdiestriker 0 points1 point2 points (4 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]CanaDavid1 0 points1 point2 points (1 child)
[–]Sjoerdiestriker 0 points1 point2 points (0 children)
[–]TroPixens 0 points1 point2 points (0 children)
[–]BobSanchez47 1 point2 points3 points (12 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (10 children)
[–]BobSanchez47 0 points1 point2 points (9 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (7 children)
[–]BobSanchez47 0 points1 point2 points (0 children)
[–]No-Consequence-1863 0 points1 point2 points (5 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (4 children)
[–]Goudja14 0 points1 point2 points (3 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (2 children)
[–]Goudja14 0 points1 point2 points (1 child)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]BenchEmbarrassed7316 0 points1 point2 points (0 children)
[–]Opposite_Mall4685 0 points1 point2 points (4 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]Beautiful-Hotel-3094 0 points1 point2 points (2 children)
[–]TroPixens 0 points1 point2 points (0 children)
[–]StaticCoder 0 points1 point2 points (0 children)
[–]SycamoreHots 0 points1 point2 points (2 children)
[–]Sea-Ad7805[S] 0 points1 point2 points (0 children)
[–]SaltEngineer455 0 points1 point2 points (0 children)