Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Explain how to copy an object in Python.



Explain how to copy an object in Python...

Answer / 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

More Python Interview Questions

Explain me dogpile effect? How can you prevent this effect?

0 Answers  


What does %s mean in python?

0 Answers  


Are methods objects in python?

0 Answers  


How to find whether string is alphanumeric or not?

0 Answers  


Tell me how does python handle the memory management?

0 Answers  


How to sort a dictionary by value in python?

0 Answers  


What happened if we call a key that is not present in dictionary and how to tackle that kind of error ?

0 Answers  


How we can send email from python?

0 Answers  


Is it easy to learn python?

0 Answers  


How does Python handle the memory management?

0 Answers  


is Python similar to ruby?

0 Answers  


What is super () in python?

0 Answers  


Categories