def f(xs = []):
xs.append(5)
return xs
print(f())
print(f())
will print: [5]
[5,5]
and I love python despite this horrendous decision, but it should be mentioned more often in beginner resources.edit: thanks for the downvote? I've answered on the order of dozens of questions about this very mechanic on SO, via IRC, and more... it's a well-known confusing factor