Beginner Python
Q30 / 101

What does __init__ do in a Python class?

Correct! Well done.

Incorrect.

The correct answer is B) Initializes the object's attributes when an instance is created

B

Correct Answer

Initializes the object's attributes when an instance is created

Explanation

__init__ is the constructor called automatically when you create an instance with MyClass().

Progress
30/101