Do Pythons mutable default arguments only work with lists?

前端 未结 0 697
南旧
南旧 2021-01-23 14:58

I tried to make mutable defaults work with single variables - and I failed with that. The code below works as expected (the list in lstis extended

相关标签:
回答
  • 消灭零回复
提交回复
热议问题