Pergunta de entrevista da empresa SAP

what is difference shallow copy deep copy in Python?

Resposta da entrevista

Sigiloso

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.