the prototype pattern were you surprised to see what happenedthe list lst contained three elements' '' 'and pointer to another list that looked like this['ab''ba'when we did shallow copy of lst to create the list that lst points toonly the elements in the list on one level were duplicated the structures contained at the addresses for the element at position in lst were not clonedonly the value pointing to the position of the list ['ab''ba'in memory was as resultboth lst and lst ended up pointing to separate lists containing the characters 'aand 'bfollowed by pointer to the same list containing ['ab''ba']which would result in an issue whenever some function changes an element at this listsince it would have an effect on the contents of the other list deep copy clearlywe will need another solution when making clones of objects how can we force python to make complete copya deep copyof everything contained in the list and its sub-lists or objectsluckilywe have the copy module as part of the standard library the copy contains methoddeep-copythat allows complete deep copy of an arbitrary listi shallow and other lists we will now use deep copy to alter the previous example so we get the output we expect from copy import deepcopy lst [' '' '['ab''ba']lst deepcopy(lst lst [ ][ 'dprint("[lst {}format(lst )print("[lst {}format(lst )resulting in[lst [' '' '['ab''ba'][lst [' '' '['ab'' ']there now we have the expected resultand after that fairly long detourwe are ready to see what this means for the buildings in our rts