結果 : python get substring before last occurrence of character