Python
-
copy - shallow and deep copy operationsPython 2017. 6. 17. 03:16
Assignment statements in Python do not copy objects, they create bindings between a target and an object. For collections that are mutable or contain mutable items, a copy is sometimes needed so one can change one copy without changing the other. : Python에서 =(assignment) 연산자는 reference를 복사하지, object 자체를 복사하는 게 아니다. copy.copy(x)Return a shallow copy of x.copy.deepcopy(x)Return a deep copy of x.[ ..