Loading section...

Variables and Naming

A variable is a named container for storing data in your computer's memory. The name "variable" comes from the fact that the value it holds can vary (change) during the program. The Labeled Box Analogy Imagine you have a warehouse full of boxes. Each box can hold something, and each box has a label on the front. The label is the variable name. The contents inside the box is the value. When you want to find something, you look for the label. When you want to change what's stored, you replace the contents of that labeled box. You don't need to know exactly where in the warehouse the box is located; the label handles that for you. What Happens in Memory You don't need to manage any of this yourself. Python handles all the memory details automatically. That's one reason Python is considered be