You have a container pandoras_box and want to create its copy but you don't know which. For each situation, choose the optimal way of copying pandoras_box if changing the container should not affect its copy.
Computer scienceProgramming languagesPythonWorking with dataData types and operationsObjects in Python
Copy of an object
Different copies
Report a typo
Match the items from left and right columns
You are not going to change the container
You are going to change the container without modifying its elements
You are going to modify the container's elements
my_copy = copy.copy(pandoras_box)
my_copy = copy.deepcopy(pandoras_box)
my_copy = pandoras_box
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.