PYTHON CIRCLE
Practice
Python Books
Archive
Subscribe
Login
Menu
Login
Practice
Python Books
Archive
Subscribe
Blog available for sell
This blog is available for sale. Please 'contact us' if interested.
Advertise with us
Python Multiple Choice Questions
Suppose B is a subclass of A, to invoke the __init__ method in A from B, what is the line of code you should write?
A. A.__init__(self)
B. B.__init__(self)
C. A.__init__(B)
D. B.__init__(A)
Show Answer
Next Question
Correct Answer:
A
Explanation: To invoke the __init__ method in A from B, either of the following should be written: A.__init__(self) or super().__init__(self).
© 2024-2025 Python Circle
Contact
Sponsor
Archive
Sitemap