Implement a search bar on the list of shows that filters the list when the user types more than 2 characters.
Asked in the Staff Android Engineer round stage. Live extension of the take-home app.
Implement filter_shows(shows, query). Return a new list containing shows whose names include the query, using case-insensitive substring matching, when query has more than two characters. For queries of length two or less, return all shows in their original order.
Examples:
filter_shows(["Walmart Live", "The Office"], "live") returns ["Walmart Live"].filter_shows(["Walmart Live", "The Office"], "of") returns both shows.shows and query are a list of strings and a string. The output is a list of strings.
def filter_shows(shows, query):