Question 2
Back to Exercise
When does __init__ run?
- A When the class is defined
- B Automatically when a new object of the class is created Correct
- C When the object is deleted
- D Only when called explicitly
Correct Answer: Option B
Student("Asha") creates the object and then calls __init__ on it.
Discussion & Comments 0
Share your method, a shortcut, or ask about a step you didn't follow.
No comments yet. Be the first to share your solution!