πŸ“Š Python
Q. What is the purpose of `__init__` method in classes?
  • (A) Destructor
  • (B) Constructor
  • (C) Overrider
  • (D) Static method
πŸ’¬ Discuss
βœ… Correct Answer: (B) Constructor

Explanation: `__init__` is the constructor method used to initialize a class.

Explanation by: Mr. Dubey
`__init__` is the constructor method used to initialize a class.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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