What does this print?
a = [[1, 2]] b = a.copy() b[0].append(3) print(a)
Answer: B. [[1, 2, 3]]
copy() is shallow: the outer list is new but the inner list is shared. Use copy.deepcopy when nested objects must be independent.
copy()
copy.deepcopy