sorry i really do not know how to describe this issue accurately in the title
I define a function like this
def f(v,l=[]):
l.append(v)
return l
In my understanding, the output should be like this:
the first call should return [0]
the second call should return [1]
the third call should return [2]
But.. here is the real output
>>> f(0)
[0]
>>> f(1)
[0, 1]
>>> f(2)
[0, 1, 2]