LogiQuest
Back to Object Oriented Programming
8

What is the output of the following code?

class Acc:
    def __init__(self):
        self.__bal = 100
a = Acc()
print(hasattr(a, '__bal'), a._Acc__bal)
Hard

Discussion (0)

  • No discussion yet. Ask a doubt or share a shortcut.

Log in to join the discussion.