結果 : remove first and last occurrence of character in string python