結果 : extract string before a character in python