I am intrigued by the output the following code generates. Can anyone explain to me why python prints [1,5] and not just [5] when it executes the function call for the third time, and if it is a feature or a bug in Python?
def funn(arg1, arg2=[]):
arg2.append(arg1)
print(arg2)
funn(1)
funn(2, [3, 4])
funn(5)