Iterate over the first " * "
for z in range ( len ( pref ) ) : NEW_LINE INDENT if ( z < first ) : NEW_LINE INDENT if ( pref [ z ] != S [ i ] [ z ] ) : NEW_LINE INDENT return " * " NEW_LINE DEDENT DEDENT DEDENT