searching the first character left of index k and not equal to greatest character of the string
i = k - 1 NEW_LINE while ( i >= 0 ) : NEW_LINE INDENT if ( s [ i ] != v [ len ( v ) - 1 ] ) : NEW_LINE INDENT for j in range ( 0 , i , 1 ) : NEW_LINE INDENT print ( s [ j ] , end = " ▁ " ) NEW_LINE DEDENT DEDENT DEDENT