What Python is doing in this case is memory conservation. Since there is already an address pointing to the value 20, there is no point in creating a new one. This is different for classes, though, because each time a class is referenced, it creates a new class object for the variable.