python copy list method code example
Example 1: create copy of an array python
new_list = list.copy()
Example 2: python copy list
a=[1,2,3,4]
b=a[:]
''' now b has all elements of a'''
new_list = list.copy()
a=[1,2,3,4]
b=a[:]
''' now b has all elements of a'''