What is the output of the following code ?
class MyClass: def __init__(self): self.__b = 1 def display(self): print(self.__b) obj = MyClass() obj.display()
1
AttributeError : Cannot access __b
None
Nothing will be printed
The methods inside class can access the pseudo private members/attributes .i.e. __b in this case
So it will print 1
Comment here: