how to clone object in python code example
Example 1: python clone object
import copy
new_ob = copy.deepcopy(old_ob)
Example 2: python copy variable
>>> import copy
>>> a = 0
>>> b = 2
>>> a = copy.copy(b)
>>> b += 1
>>> a
2
>>> b
3
import copy
new_ob = copy.deepcopy(old_ob)
>>> import copy
>>> a = 0
>>> b = 2
>>> a = copy.copy(b)
>>> b += 1
>>> a
2
>>> b
3