結果 : check if last character in string python