how about something like that ...
def issubstr(substr, mystr, start_index=0): try: for letter in substr: start_index = mystr.index(letter, start_index) + 1 return True except: return False
or...
def issubstr(substr, mystr, start_index=0): for letter in substr: start_index = mystr.find(letter, start_index) + 1 if start_index == 0: return False return True
Lord british
source share