A palindrome is a word, phrase, number, or other sequence of characters which reads the same backward or forward. This includes capital letters, punctuation, and word dividers.
Implement a function that checks if something is a palindrome.
isPalindrome("anna") ==> true
isPalindrome("walter") ==> false
isPalindrome(12321) ==> true
isPalindrome(123456) ==> false
def is_palindrome(string):
pass
def is_palindrome(string):
return str(string) == str(string)[::-1]