Question

The constructor method of a class is __init__(self) -True or False?

The constructor method of a class is __init__(self)

-True or False?

0 0
Add a comment Improve this question Transcribed image text
Answer #1

# STAY HOME # STAY SAFE

def __init__(self): function of a class in python program is the constructor of the class. It is always called whenever an object of the class is created. It basically initializes the data members of a class. It may or may not have arguments. If the constructor has arguments then it is called as parametrized constructor and if it doesn't have any arguments then it is called as default constructor.

=> The given statement is true.

Add a comment
Know the answer?
Add Answer to:
The constructor method of a class is __init__(self) -True or False?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT