# 1501.py def f(x,a): b=a; b.append(x); return b a=[1,2] b=f(4,a) print a # [1, 2, 4] b=f(5,a) print a # [1, 2, 4, 5]