I just wrote this codes on shell;
>>> def foo(x=[]):
x.append(26)
return x
>>> foo()
[26]
>>> foo()
[26, 26]
>>> foo()
[26, 26, 26]
>>>
It's astonishing. I don't understand this behaviour, however, in script it's normal. Why does this appending that element when called the function? I expected that only one [26]
each time I call the function.