Anyone explain this please......
def f(i,list1=[]):
list1.append(i)
return list1
f(1)
f(2)
print(f(3))
Output: [1,2,3].
I cannot understand this, because everytime my list1 is initialized as a empty list.
Can anyone explain this??