Write the my_copy() function that takes two parameters obj, copy_mode and returns a copy of an object. The value of copy_mode may be either "deep copy", then you should make a deep copy of the given object, or "shallow copy", then your function should return a shallow copy.
Computer scienceProgramming languagesPythonWorking with dataData types and operationsObjects in Python
Copy of an object
Making a copy
Report a typo
Write a program in Python 3
import copy
def my_copy(obj, copy_mode):
...
___
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.