Function that return true if sub is a sub - sequence in s
def checkSub ( sub , s ) : NEW_LINE INDENT j = 0 NEW_LINE for i in range ( len ( s ) ) : NEW_LINE INDENT if ( sub [ j ] == s [ i ] ) : NEW_LINE INDENT j += 1 NEW_LINE DEDENT DEDENT if j == int ( len ( sub ) ) : NEW_LINE INDENT return True NEW_LINE DEDENT else : NEW_LINE INDENT return False NEW_LINE DEDENT DEDENT