Python - Encapsulation and Data Protection
Consider this code:
What is the output?
class Secret:
def __init__(self):
self.__data = 123
def reveal(self):
return self.__data
s = Secret()
print(s._Secret__data)
s.__data = 456
print(s.reveal())What is the output?
