I have some trouble understanding the output of this code.
def func(a,L = []):
L.append(a)
return(L)
print(func(1),func(3))
The output is [1,3][1,3] It seems that each time it takes all the arguments from all the function calls each time a function is called. Does it happen due to same function being called in the same line? How does it work?