Question: 8b. Write a recursive function named find(text, substring) that will return the substring if the substring is inside the text or return an empty string

8b. Write a recursive function named find(text, substring) that will return the substring if the substring is inside the text or return an empty string if substring is not inside the text. Write another function named is_string_there(text, string) to test the find function. The function will return True if the string is inside the text or False if the string is not inside the text. (5 marks) In [8]: 1 def find(text, substring): mtina def is_string_there(text, string): 14 print(is_string_there("I love DSAG", "DSAG")) 15 print(is_string_there("I love python", "DSAG')) True False
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
