Answer Posted / chaitanya
There are two ways in which objects can be copied in python.
Shallow copy & Deep copy.
Shallow copies duplicate as minute as possible whereas Deep copies duplicate everything.
If a is object to be copied then
-copy.copy(a) returns a shallow copy of a.
-copy.deepcopy(a) returns a deep copy of a.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is a python method?
How do you sort a list in descending in python?
How to check if string A is substring of string B?
What is a script file in python?
What is egg and wheel in python?
Do you know what is the key difference between a list and the tuple?
What is python programming language?
What are the benefits of using python?
Can you learn python with no experience?
Does range start at 0 python?
What do you mean by list comprehension?
Python How to create a multidimensional list?
If you are ever stuck in an infinite loop, how will you break out of it?
Explain try, raise, and finally?
How do you comment in python?