ShriRam Changed status to publish August 21, 2023
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
print(“Created”)
def __del__(self):
class_name = self.__class__.__name__
print (class_name, “destroyed”)
pt1 = Point(55,66)
print (pt1.x) # prints the ids of the obejcts
del pt1
ShriRam Changed status to publish August 21, 2023