Object Oriented Python: Extending Class, you didn't finish how to print from book and textbook. You left off how to print the output from class book and textbook. You left out print(b.str()). You show how to add in def str(self): but you didn't show how to call it.



class Book:
    def __init__(self, title, author):
        self.title = title
        self.author = author

    def __str__(self):
        return 'Book: {} by {}'.format(self.title, self.author)

class Textbook(Book):
    def __init__(self, title, author, edition) -> object:
        super().__init__(title, author)
        self.edition = edition

    def __str__(self):
        return 'Textbook: {} by {} edition {}'.format(self.title, self.author, self.edition)



def main():
    from classes import Book
    from classes import Textbook

    b = Book('The Hitchhikers Guide to the Galaxy', 'Douglas Adams')

    b = Textbook('Cisco CCNP', 'Todd Lammle', '5')

if __name__ == '__main__':


Book: The Hitchhikers Guide to the Galaxy by Douglas Adams
Textbook: Cisco CCNP by Todd Lammle edition 5