Python Programming - Objects - Discussion

Discussion Forum : Objects - General Questions (Q.No. 2)
2.
What is the purpose of the __init__ method in a Python class?
To initialize the class object
To define the class attributes
To create a new instance of the class
To destroy the class object
Answer: Option
Explanation:
The __init__ method is used to initialize the attributes of a class when a new object is created.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.