r/PythonLearning • • 27d ago

Python List Operations and Aliasing

Post image

An exercise to help build the right mental model for Python data.

The β€œSolution” link uses 𝐦𝐞𝐦𝐨𝐫𝐲_𝐠𝐫𝐚𝐩𝐑 to visualize execution and reveals what’s actually happening.

0 Upvotes

2 comments sorted by

View all comments

Show parent comment

1

u/Sea-Ad7805 23d ago

Yes, that's one way of looking at it, another is that b + [4] creates a new value that is then assigned to b.