Take all middle characters in between first and last most *
for z in range ( first , last + 1 ) : NEW_LINE INDENT if ( S [ i ] [ z ] != ' * ' ) : NEW_LINE INDENT mid += S [ i ] [ z ] NEW_LINE DEDENT DEDENT suff = suff [ : : - 1 ] NEW_LINE return pref + mid + suff NEW_LINE