結果 : python get string before last occurrence of character