Python Classroom image

Anil  Bist / Professional / Web Technology
 
To post your Question Join Classroom
 
Question No  (29 of 31)
First 23 I 24 I 25 I 26 I 27 I 28 I 29 I 30 I 31 Last
 
Question:-
What is the difference between deep and shallow copy?
 
Answer:-

Shallow copy is used when a new instance type gets created and it keeps the values that are copied in the new instance. Shallow copy is used to copy the reference pointers just like it copies the values. These references point to the original objects and the changes made in any member of the class will also affect the original copy of it. Shallow copy allows faster execution of the program and it depends on the size of the data that is used.

Deep copy is used to store the values that are already copied. Deep copy doesn’t copy the reference pointers to the objects. It makes the reference to an object and the new object that is pointed by some other object gets stored. The changes made in the original copy won’t affect any other copy that uses the object. Deep copy makes execution of the program slower due to making certain copies for each object that is been called.

  
 
 
 
image
Anil  Bist

Skills    Python

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,
Description:-

in 2006, i Join a web development company in Bangalore and start work on "Ruby on Rail" this is my first web development framework and we worked in this framework and develop four to five project after some time , I moved to JEE/Sturst frame work,

After some time i decided that now times come and I have to go on in my own way and I started a company name is "Soarlogic&q
Explore

 

  Students (3)

Ask 
image
Vikash
Ask 
image
Anil
Ask 
image
Anil
 
 

Recommended Classes

Rajendra Kumar
I have more then 5 year of Mobile App Development Experience and have worked in Android Native, I...
Professional
image Anil Bist
in 2006, i Join a web development company in Bangalore and start work on "Ruby on Rail"...
Professional
image Sandeep Srivastava
I am working as software develop from last 9 year.worked in Java, Struts, SpringMVC, Hibernate.
Professional