You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classIsACLover():
#This is my constructordef__init__(self, name,title):
self.name=nameself.title=title#This is my deconstructordef__del__(self):
print("The insect instance of "+self.__name__+" was just destroyed")
nelan=IsACLover("Nelan", "CDeveloper")
if(nelan.title=="CDeveloper"):
print("Nelan The Best Person To help you in C And Assembly")
How To Create Class With Attributes
classSoccerPlayer:
fName="Lionel"lName=" Messi"age=34# How To Delete the attribute agedelattr(SoccerPlayer, "age")
richard= {
'major': 'CS',
'gender': 'Male',
'age': 29
}
# Right Way to Get An Attributeprint(richard.get(age))