Question: Using python and while loop only, Write code that takes a string and a list of substrings, each with a length of three. Return True

Using python and while loop only,

Write code that takes a string and a list of substrings, each with a length of three. Return True or False depending on whether the strings contains any of the substrings. For example, if the string was happybirthday, and the list of substrings was ['hay', 'pyr', 'bir', 'hdy'], your code would return True. Do not use the in keyword. You may not use any built-in functions/methods besides len() and .append().

Template:

def inside(string, list): string = string list = list #YOUR CODE GOES HERE (indented) return False #END YOUR CODE

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!