結果 : python get string before nth occurrence of character