πŸ“Š Python
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
πŸ’¬ Discuss
βœ… Correct Answer: (B) It initializes the object

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

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

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
70
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
87%
Success Rate