Multiple choice technology programming languages

The constructor in python is _____

  1. def_init()

  2. name of class itself.

  3. python_init_

  4. init

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

Python uses the special method init as the constructor. It's automatically called when a new instance is created and is responsible for initializing the object's attributes.