If both are not spaces , do swap
else : NEW_LINE INDENT Str [ start ] , Str [ end ] = ( Str [ end ] , Str [ start ] ) NEW_LINE start += 1 NEW_LINE end -= 1 NEW_LINE DEDENT print ( ' ' . join ( Str ) ) NEW_LINE