Pregunta de entrevista de SAP

what is difference shallow copy deep copy in Python?

Respuesta de la entrevista

Anónimo

19 de abr de 2024

Shallow copy is used when a new instance type is created, while deep copy saves the values that have already been copied, whereas shallow copy saves the values that have been copied. In other words, shallow copying makes the program run faster, while deep copying makes it slower.