Question OOP-ENC-0036
EasyWhat is the output of this code?
class A:
def __init__(self):
self.__x = 5
a = A()
try:
print(a.__x)
except AttributeError:
print("error")
- A.
5
- B.
error
- C.
Sign up free to see the answer and a step-by-step explanation.