Object-Oriented Programming · Google · Medium
Create a Bookshelf class that can insert, reposition, and delete books. Include these methods: add_book(title: str): Place a book identified by title onto the shelf. remove_book(title: str): Delete the book named title from the shelf. If no such book is present, leave the shelf unchanged. move_book(title: str, position: int): Relocate the book named title to position. If that title is absent, make no changes. Start with an empty Bookshelf, and maintain books in the sequence…
Checking your access…