Python Program to Check if a Substring is Present in a Given String
str = input ('Enter String')
word = input ('Enter String to be searched')
str +=' '
len = len(str)
x=''
for i in range (len):
ch = str[i]
if (ch!=' '):
x=x+ch
else :
if (x==word):
print ('Substring is found')
break
x=''
Comments
Post a Comment