πŸ“Š Python
Q. Which of these best describes a constructor in Python?
  • (A) A method that runs after object deletion
  • (B) A method that runs at the start of the program
  • (C) A method that initializes an object
  • (D) A method that returns the class name
πŸ’¬ Discuss
βœ… Correct Answer: (C) A method that initializes an object

Explanation: `__init__()` is the constructor method called when an object is created.

Explanation by: Mr. Dubey
`__init__()` is the constructor method called when an object is created.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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