1. Home
  2. Data Science
  3. Python
  4. What is the difference between shallow copy and deep copy…

Added 25 Nov 2026

What is the difference between shallow copy and deep copy in Python?

  1. Shallow copy is slower
  2. Shallow copies share nested objects; deep copies duplicate them Correct answer
  3. Deep copy shares references
  4. There is no difference

Correct answer

B. Shallow copies share nested objects; deep copies duplicate them

5 views

MCQSEXAM

Explanation

A shallow copy copies only the outer container, a deep copy copies nested objects recursively.

Reference

Asked in: Python Interview Advanced Python

https://docs.python.org/3/library/index.html

Preparing for an exam?

Doubts & discussion

Not sure why the answer is B? Ask here and get an explanation.

Ask a doubt about this MCQ

Shown after review. No links please.

More Python MCQs

Practise all Python MCQs

Similar MCQs