What is the output of the following code ?
class A: def __init__(self, x=47): self._x = x class B(A): def __init__(self): super().__init__(98) def printme(self): print(self._x) obj = B() obj.printme()
98
47
AttributError
None
super().__init__(98) sets the value of _x to 98 so printme() will print 98 . Note _x is not a private variable
Comment here: