Domanda di colloquio di SAP

what is difference shallow copy deep copy in Python?

Risposta di colloquio

Anonimo

19 apr 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.