Suppose I ask the user to input two strings. I want to find out if the smaller string is a substring of the larger one. I'm not allowed to use the contains()
command or any other shortcuts.
I tried putting the both into different lists:
def strtolist(sub_string, string):
subl=[]
for i in sub_string:
subl.append(i)
print('subl', subl)
strl=[]
for e in string:
strl.append(e)
print('str', strl)
sub_string = 'App'
string = 'Application'
strtolist(sub_string, string)
Any suggestion on what to do next?