Commit 42d02056 authored by Raquel's avatar Raquel 💬


parent e713e5fc
class Bookshelf:
def __init__(self, books):
self.book_storage = []
#method to add books to bookshelf (book_storage)
def add_book(self):
for x,y in self.books:
......@@ -18,13 +12,6 @@ class Bookshelf:
for book in self.book_storage:
print (book)
class Book:
def __init__(self,title,author):
......@@ -33,19 +20,10 @@ class Book:
def __str__(self):
return f"{self.title} by {}"
#book1=Book("title1", "author1")
book_shelf=Bookshelf(books=[('The old man and the see', 'Ernest Hemingway'),
('Beyond Good and Evil', 'Friedrich Nietzsche'),])
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment