

InterviewSolution
Saved Bookmarks
1. |
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) |
Answer» The correct choice is (a) A.__init__(self) Easy explanation - To invoke the __init__ method in A from B, either of the following should be written: A.__init__(self) or super().__init__(self). |
|