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
Does python have null?
What is abstraction in python?
How to walk through a list in a sorted order without sorting the actual list?
How will you convert an integer to a unicode character?
Explain about odbc and python?
How to test multiple variables against a value?
Please write a reg expression that confirms an email id using the python reg expression module
Which is more powerful python or c++?
Explain about assertions in python?
Explain split(), sub(), subn() methods of “re” module in python.
How to copy an object in python?
What do you understand by *args and **kwarg python?
How do I run python?
What is the output of print str + “test” if str = ‘hello world!’?
What is an f string in python?