Question
In Python, which comparison about Shallow vs Deep Copy is accurate?
- Shallow copies are cheaper and often enough, while deep copies clone nested structures at greater runtime and memory cost.
- There is no practical difference in behavior, performance, or maintainability when Shallow vs Deep Copy is involved.
- The oldest option related to Shallow vs Deep Copy is always the right production choice regardless of workload or context.
- Differences around Shallow vs Deep Copy are mostly cosmetic, so correctness and debugging quality do not really change.
Hint
Focus on the behavior or tradeoff, not just the keyword.
Answer and rationale
Correct answer: A. Shallow copies are cheaper and often enough, while deep copies clone nested structures at greater runtime and memory cost.
Shallow copies are cheaper and often enough, while deep copies clone nested structures at greater runtime and memory cost. This is the comparison that usually separates memorization from understanding.
Track: Python