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
How to avoid having class data shared among instances in python?
Write a program in python to check if a sequence is a palindrome.
How will you remove an object from a list?
What are tuples in python?
Is numpy faster than pandas?
What is for-else and while-else in python?
What does serialization mean in python?
What are negative indices?
Where is python used in real world?
What is class in python?
Does python have a switch-case statement?
Does facebook use python?
What is python software?
What does [::-1} do?
What are the differences between python 2.x and python 3.x?