A

Admin • 828.03K Points
Coach

Q. What is the purpose of `__init__` method in Python classes?

  • (A) It is a destructor
  • (B) It initializes the object
  • (C) It is a static method
  • (D) It defines class name
  • Correct Answer - Option(B)
  • Views: 5
  • Filed under category Python
  • Hashtags:

Explanation by: Admin
`__init__` is the constructor method called when a new object is created.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.