-
-
Save stephengruppetta/60ec99e3a43abc074712c01faac3971f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Book: | |
def __init__(self, title, author, publication_year): | |
self.title = title | |
self.author = author | |
self.publication_year = publication_year | |
class Library: | |
def __init__(self): | |
self.books = [] | |
def add_books(self, books): | |
""" | |
Add books to the library | |
:param books: list (or other sequence) of Book objects | |
""" | |
self.books.extend(books) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment