copy python' code example
Example 1: python clone object
import copy
new_ob = copy.deepcopy(old_ob)
Example 2: python copy list
a=[1,2,3,4]
b=a[:]
''' now b has all elements of a'''
import copy
new_ob = copy.deepcopy(old_ob)
a=[1,2,3,4]
b=a[:]
''' now b has all elements of a'''