Examveda

What is the purpose of the constructor (__init__ method) in a class in Python?

A. It initializes the attributes of an object

B. It defines a method

C. It is a destructor

D. It is a constructor

Answer: Option A


Join The Discussion

Related Questions on Concept of Object Oriented Programs in Python