Python's variables aren't buckets that contain things. They're pointers that reference objects.
The way Python's variables work can often confuse folks new to Python, both new programmers and folks moving from other languages like C++ or Java.
Below are 9 minutes of screencasts explaining how Python's variables and values work. If you prefer reading over watching, you can find the transcript for each screencast below each video.
Talks I recommend on this subject:
Articles I recommend on this subject:
Need to fill-in gaps in your Python skills? I send regular emails designed to do just that.
Sign up for my Python tips emails and I'll share my favorite Python insights with you every couple weeks.
Need to fill-in gaps in your Python skills? I send weekly emails designed to do just that.