Python - Encapsulation and Data Protection
What will be the output of the following code?
class Person:
def __init__(self, name):
self._name = name
@property
def name(self):
return self._name
@name.setter
def name(self, value):
self._name = value.upper()
p = Person('alice')
p.name = 'bob'
print(p.name)