- Create and use Sets
Let's extend the library with the following functionality:
- In your library, create a set that contains a list of each genre that you have a book for
- Every time the user adds a book to the library, add the book's genre to your new set
- Add a new option to your loop to ask the user if they want to check if the library has any books of a specific genre
- If the user selects that option, ask them for the genre they want to check and them let them know if the library has any books of that genre.