結果 : check last character of a string python