Sanket Nawale
Sanket Nawale

Reputation: 21

What are the inbuilt methods in python while declaring class like "__init__" and "__str__"?

This are the default methods. Which are other default methods?

class Person:
    def __init__(self):
        pass
    
    def __str__(self):
        pass

Upvotes: 1

Views: 32

Answers (1)

Akihito KIRISAKI
Akihito KIRISAKI

Reputation: 1333

They are explained at this document. Also dir() can show names methods of class.

Upvotes: 1

Related Questions