4 ms·
This is just like how python default values are global variables that if you modify over time (ie, def foo(x = []): x.append(0), the second iteration x would be
by zanny 13y ago
This is just like how python default values are global variables that if you modify over time (ie, def foo(x = []): x.append(0), the second iteration x would be [0,0], because it is only initialized once.