Problem Statement
Which function performs a deep copy of an arbitrary Python object graph?
Explanation
copy.copy makes a shallow copy. copy.deepcopy walks the entire object graph and copies inner containers too.
For custom classes, you can guide deep copy with __deepcopy__ if you need special handling.
Code Solution
SolutionRead Only
import copy b = copy.deepcopy(a)
