class Animal:

    def __init__(self):
        print("ANIMAL CREATED")

    def who_am_i(self):
        print("Animal")

    def eat(self):
        print("EATING")


class Dog(Animal):

    def __init__(self):
        Animal.__init__(self)
        print("DOG CREATED")

    def bark(self):
        print("WOOF")


myAnim = Dog()
myAnim.who_am_i()
myAnim.eat()
myAnim.bark()


# SPECIAL METHODS
class Book:

    def __init__(self, title, author, pages):
        self.title = title
        self.author = author
        self.pages = pages

    def __str__(self):
        return f"Title: {self.title}, Author: {self.author}, Pages: {self.pages}"

    def __len__(self):
        return self.pages

    def __del__(self):
        print("a book is destroyed!")


b = Book("Python", "Jose", 200)

print(b)
print(len(b))

del b
