結果 : how to check end of string in python