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 useful is python?
What functions or methods will you use to delete a file in python?
How long do goats sleep?
What is sys stdout flush ()?
How do I delete a file?
Explain inheritance in python with example?
Can I use python in linux?
Who uses python?
What is a CGI script in Python?
How to create dynamic array in python?
Can you tell the difference between break and continue in python?
How do I sort alphabetically in python?
So, what is an iterator, then?
Write a small code to explain repr() in python ?
How do I run a py file in python shell?