Question: please use python to do it Problem 2 Write the recursive function containing word, which takes as its argument a nested list of sentence strings
please use python to do it

Problem 2 Write the recursive function containing word, which takes as its argument a nested list of sentence strings and a target word, returning a list of sentences that contain the target word. .The function should ignore objects of types other than list or string. Assume that if the function encounters a string, that the string is guaranteed to be a sentence. Any sentence will be a string of words separated by any number of spaces, with no other characters (i.e. no punctuation-no periods, commas, etc). For this function, uppercase words are considered distinct from lowercase words. o Example: "Excellent is not considered the same as "excellent" It should ignore objects of types other than list or string. For example, consider the list defined below: sentence_list ['I am Boo, ['I wear Boots', [Boo is love' 'Nothing here' ]] The call containing-word(sentence-list, Boo') should return('I am Boo, Boo is love'] def containing word(slist: [str or list], target: str) - [str]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
