Python Object Oriented programming

Is it mandatory to use both init() and str() together in OOPs ?

1 Like

@yokaiwangnao4160

No , it is not mandatory.

But these two methods are almost used by everyone as init() is useful for initialization which makes easier to create or instantiate object and str() is useful for debugging.

2 Likes