The quiz where the difficulty automagically adapts to the player's Python knowledge
This is a question page. You can use this page to bookmark a question. Start a new quiz!
import copy a = [1, 2] b = copy.deepcopy(a) print(a is b)
When copy.deepcopy() is used, the copy of the object has a new memory address and its elements have new memory addresses too. However, the elements of a here are not mutable and as such copy.deepcopy() returns a shallow copy (behaves like copy.copy() ). (towardsdatascience.com/assignment-shallow-or-deep-a-story...)
Question difficulty: 🔵🔵🔵🔵🔵