How do I check if a given Python string is a substring of another one?
Try using in
like this:
>>> x = 'hello'
>>> y = 'll'
>>> y in x
True
string.find("substring")
will help you. This function returns -1
when there is no substring.
Try
isSubstring = first in theOther