Deep copy and shallow copy of distinction Python

Disclaimer: This article is a blogger original article, follow the CC 4.0 BY-SA copyright agreement, reproduced, please attach the original source link and this statement.
This link: https://blog.csdn.net/qq_18310041/article/details/98245587

Direct assignment: With the original variables change

Shallow copy: copy.copy copy only the inside of the parent object, the child objects do not copy target

Deep copy: copy.deepcopy copy of the object and its children

Guess you like

Origin blog.csdn.net/qq_18310041/article/details/98245587