結果 : function to check if string is palindrome python