Question: This is python language I need to create recursive function that checks to see if text2 contains a substring of text1. This is normal function

This is python language

I need to create recursive function that checks to see if text2 contains a substring of text1. This is normal function what I made. no commands such as .contains, .string dlicing, .startswith when you are making the function

def check(text1,text2):

if text1 =="":

return True

if text2 in text1:

return True

else:

return False

def main():

text2=str(raw_input("Enter the text2: "))

text1= str(raw_input("Enter the text1: "))

print(check(text1,text2))

main()

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!