Your question is Return Only Matching Book Title. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
NextRoll stores a large catalog export as newline-delimited book records. Each record contains a title, description, and author separated by |. Given the export and a search word, return the title of the first book whose title, description, or author contains that word as a complete case-insensitive word.
Process records in input order. Return None when no book matches. A word must not match as part of a larger alphanumeric or underscore token. For example, ad does not match advertising.
Implement find_book_title(books_text, search_word).
books_text is a string containing zero or more records separated by newline characters.title|description|author.| or newline characters.search_word is a non-empty string without whitespace.None if no record matches.| or newline charactersdef find_book_title(books_text, search_word):