Redefine __str__ method in the same way for multiple classes in Python

前端 未结 0 1570
一生所求
一生所求 2020-12-15 08:59

I have multiple classes and if I instantiate any of them, I want to be able to "print" the instantiated object by redefining the str method for th

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