1. Which function performs a deep copy of an arbitrary Python object graph?
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.
import copy b = copy.deepcopy(a)