Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class car:
- def __init__(self, name):
- self.name = name
- print("Car Created: " + self.name)
- def start(self):
- print("Start: " + self.name)
- def __del__(self):
- print("Car Destroyed: " + self.name)
- class mazda(car):
- #del __init__(self):
- # self.name = "Mazda"
- def start(self):
- print("Start Mazda: " + self.name)
- b = mazda("3")
- b.start()
- del b
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement