Vidyalelo
Python · Q22

Concept of Object Oriented Programs in Python

Programming · Python · question 22

Q22

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

A.
It initializes the attributes of an object
Answer
B.
It defines a method
C.
It is a destructor
D.
It is a constructor

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board