Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumPythonshallow vs deep copySingle-choice MCQ

Two list entries point at the same object. After `copy.deepcopy`, what does `dc[0] is dc[1]` show?

import copy shared = [0] orig = [shared, shared] dc = copy.deepcopy(orig) print(dc[0] is dc[1])