|
|
|
|
|
by NekkoDroid
15 days ago
|
|
Default arguments are only evaluated once and assigned the same instance to every call that doesn't specify that argument. So when you assign a new list as a default argument and then append to that list, the next call will already have one element in that list. So what you need to do is have it "None-able" and within the function create a new list. |
|
No need to do the annoying if x is None.