why does this code
def f(sum, l=[]):
l.append(sum)
print(l)
f(10)
f(10)
return
[10]
[10, 10]
I cannon understand why shouldn't it return
[10]
[10]
why does this code
def f(sum, l=[]):
l.append(sum)
print(l)
f(10)
f(10)
return
[10]
[10, 10]
I cannon understand why shouldn't it return
[10]
[10]