Do not use mutable objects as default arguments in Python
This Python peculiarity can lead to some unexpected behavior of your programs.
Published in
2 min readJul 15, 2021
--
Say, you want a function that appends some data to a list. And if the list is not passed, then appends the same data to a newly created list.