the new object ( piece of memorycreated by running the literal expression 'spam'but variable still refers to the original object because this assignment is not an in-place change to the object it changes only variable anot change the value of bb still references the original objectthe integer the resulting reference structure is shown in figure - the same sort of thing would happen if we changed to 'spaminstead--the assignment would change only bnot this behavior also occurs if there are no type differences at all for exampleconsider these three statementsa in this sequencethe same events transpire python makes the variable reference the object and makes reference the same object as aas in figure - as beforethe last assignment then sets to completely different object (in this casethe integer which is the result of the expressionit does not change as side effect in factthere is no way to ever overwrite the value of the object --as introduced in integers are immutable and thus can never be changed in place one way to think of this is thatunlike in some languagesin python variables are always pointers to objectsnot labels of changeable memory areassetting variable to new value does not alter the original objectbut rather causes the variable to reference an entirely different object the net effect is that assignment to variable itself can impact only the single variable being assigned when mutable objects and in-place changes enter the equationthoughthe picture changes somewhatto see howlet' move on shared references and in-place changes as you'll see later in this part' there are objects and operations that perform in-place object changes--python' mutable typesincluding listsdictionariesand sets for instancean assignment to an offset in list actually changes the list object itself in placerather than generating brand-new list object shared references