copy

Table of Contents

Overview

copy.copy(x)      # shallow
copy.deepcopy(x)
shallow

inserts references into a new object to the objects found in the original.

deep

recursively inserts copies into a new object of the objects found in the original. Recursive objects may cause a recursive loop.