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 difference between match & search in regex module in python?
How do you sort a list in descending in python?
How does mro work in python?
What is a counter in python?
Describe how to send email from a python script?
Explain in detail – inheritance in python?
How to convert a list into a tuple?
How is exception handling done in python?
How do you find missing values in python?
What is pip install?
Explain different way to trigger/ raise exception in your python script?
How do you install a sphinx python?
Where is python in anaconda?
What is shebang python?
Is python sorted stable?