How do you copy an object in Python?

Hi, How do you copy an object in Python

Built-in container types have a convenience copy() method that performs a shallow copy, e.g.

mylist = [0, 42]
shallow_copy_of_mylist = mylist.copy()

The copy modules provides two functions for shallow and deep copy of any object.