the prototype pattern in the rts exampleevery building should keep list of the prototypes it can use to generate unitslike list of units of the same levelwith the properties to match the current state of the building when building is upgradedthis list is updated to match the new capabilities of the building we get to remove the redundant calls from the equation this is also the point where the prototype design pattern deviates from the abstract factory design patternwhich we will look at later in this book by swapping the prototypes that building can use at runtimewe allow the building to dynamically switch to generating completely different units without any form of sub-classing of the building class in question our buildings effectively become prototype managers the idea of prototype pattern is greatbut we need to look at one more concept before we can implement the pattern in our buildings shallow copy vs deep copy python handles variables little differently than do other programming languages you may have come across apart from the basic typeslike integers and stringsvariables in python are closer to tags or labels than to the buckets other programming languages use as metaphor the python variables are essentially pointers to addresses in memory where the relevant values are stored let' look at the following examplea range( , print("[ {}format( ) print("[ {}format( ) append( print("[ {}format( )print("[ {}format( )the first statement points the variable to list of numbers from to (excluding nextvariable is assigned to the same list of numbers that is pointing to finallythe digit is added to the end of list pointed to by