What is the difference between shallow copy and deep copy in Python?
Correct answer
B. Shallow copies share nested objects; deep copies duplicate them
6 views
B. Shallow copies share nested objects; deep copies duplicate them
6 views
A shallow copy copies only the outer container, a deep copy copies nested objects recursively.
Asked in: Python Interview Advanced Python
https://docs.python.org/3/library/index.htmlNot sure why the answer is B? Ask here and get an explanation.