human
I am working on the file "Classes+and+Objects.ipynb".
The first task is:
There are also decorators which we can use to define a setter and a deleter for our attribute (a deleter will delete the attribute from our object). The getter, setter and deleter methods must all have the same name
Can you write Python code for it?
assistant
#Here is the Python code you requested.

class Person:
    '''Simple Person Class
    
       Attributes:
           firstname: String representing first name of the person
           lastname: String representing last name of the person
    '''
    def __init__(self,firstname,lastname):
        '''Initialiser method for Person'''
        self.firstname = firstname
        self.lastname = lastname
    
    @property
    def fullname(self):
        '''Returns the full name of the person'''
        return self.firstname + ' ' + self.lastname
    
    @fullname.setter
    def fullname(self,value):
        firstname,lastname = value.split(" ")
        self.firstname = firstname
        self.lastname = lastname
        
    @fullname.deleter
    def fullname(self):
        del self.firstname
        del self.lastname
    
p1 = Person('John','Doe')
print(p1.fullname)

p1.fullname = 'Jack Daniels'
print(p1.fullname)