into it of the objects found in the original as concrete examplesuppose [[ ],[ ]and copy copy(athen if we update as [ ][ [ ][ also changes to howeverif copy deepcopy( )then the same update will leave unchanged the difference between shallow and deep copying is only relevant for compound objectsthat is objects that contain other objectssuch as lists or class instances if [ and copy copy( )then if we update as [ is unchanged diving under the hooddeep copy is more challenging to implement since recursive objects (compound objects thatdirectly or indirectlycontain reference to themselvesresult in infinite recursion in naive implementation of deep copy furthermoresince deep copy copies everythingit may copy too muche book-keeping data structures that should be shared even between copies the copy deepcopy(function avoids these problems by caching objects already copiedand letting user-defined classes override the copying operation in particulara class can override one or both of __copy__(and __deepcopy__(copying is defensive--it may avoided if it' known that the client will not mutate the object similarlyif the object is itself immutablee tuplethen there' no need to copy it