a = ['1', '2', '3']
class Test:
def __init__(self, y):
self.y = y
def r(self):
y2 = self.y
y2.append('8')
return y2
def t(self):
return self.y
print(Test(a).r())
print(Test(a).t())
['1', '2', '3', '8']
['1', '2', '3', '8']