copy() python code example
Example 1: python clone object
import copy
new_ob = copy.deepcopy(old_ob)
Example 2: copyfile pyhon
from shutil import copyfile
copyfile(src, dst)
Example 3: .copy python
new_list = list.copy()
# returns a new list without modifying the orginal list.
Example 4: python copy set
s1 = set()
s2 = s1.copy()
Example 5: python copy list
a=[1,2,3,4]
b=a[:]
''' now b has all elements of a'''