warmtones list color palette list color red green blue red green blue figure shallow copy of list of colors this is better situation than our first attemptas we can legitimately add or remove elements from palette without affecting warmtones howeverif we edit color instance from the palette listwe effectively change the contents of warmtones although palette and warmtones are distinct liststhere remains indirect aliasingfor examplewith palette[ and warmtones[ as aliases for the same color instance we prefer that palette be what is known as deep copy of warmtones in deep copythe new copy references its own copies of those objects referenced by the original version (see figure warmtones color palette list red green blue color red green blue list color red green blue color red green blue figure deep copy of list of colors python' copy module to create deep copywe could populate our list by explicitly making copies of the original color instancesbut this requires that we know how to make copies of colors (rather than aliasingpython provides very convenient modulenamed copythat can produce both shallow copies and deep copies of arbitrary objects this module supports two functionsthe copy function creates shallow copy of its argumentand the deepcopy function creates deep copy of its argument after importing the modulewe may create deep copy for our exampleas shown in figure using the commandpalette copy deepcopy(warmtones