r/PythonLearning • u/Sea-Ad7805 • Jul 14 '26
Python Data Model Exercise
An exercise to help build the right mental model for Python data.
The โSolutionโ link visualizes execution and reveals whatโs actually happening using ๐บ๐ฒ๐บ๐ผ๐ฟ๐_๐ด๐ฟ๐ฎ๐ฝ๐ต.
67
Upvotes
2
u/arivictor Jul 16 '26
https://parsnip.dev/editor/qDQDFUs4QrHX
C
At the start
b = adoes not create a copy,bsimply referencesa. However, as soon as you dob = b + [[3]]you create a new list inb,ais no longer linked tob.