I am to create an old-style class with a constructor __str__, and accessor methods, such that the following code:
abook = Book(author = "Amy Doe", title = "Sun rise", price = 13.50)
Output should be as follows:
Sun Rise by Amy Doe
So far I only have:
def __init__(self, author, title, price):
self.author = Author
self.title = Title
self.price = Price
Where does the __str__ come in?
Please help, due tomorrow.
Thanks in advance