1import copy
2
3class A(object):
4 def __init__(self, a)
5 self.a = a
6
7a = A(38)
8
9# Deepcopy
10a2 = copy.deepcopy(a)
11
12# Shallow copy -> use this if copy.deepcopy() fails
13a3 = copy.copy(a)
1new_list = list.copy()
2
3# returns a new list without modifying the orginal list.