def is_palindrome(s):
    """
    Determine whether the string is palindrome
    :param s:
    :return: Boolean
    >>> is_palindrome("a man a plan a canal panama".replace(" ", ""))
    True
    >>> is_palindrome("Hello")
    False
    """
    return s == s[::-1]


if __name__ == "__main__":
    s = input("Enter string to determine whether its palindrome or not: ").strip()
    if is_palindrome(s):
        print("Given string is palindrome")
    else:
        print("Given string is not palindrome")

@@ -8,25 +8,38 @@
 palindrome(s
-)
+: str) -%3E bool
 :%0A    %22%22%22%0A  
@@ -238,27 +238,412 @@
   False%0A    
-%22%22%22
+%3E%3E%3E is_palindrome(%22Able was I ere I saw Elba%22)%0A    True%0A    %3E%3E%3E is_palindrome(%22racecar%22)%0A    True%0A    %3E%3E%3E is_palindrome(%22Mr. Owl ate my metal worm?%22)%0A    True%0A    %22%22%22%0A    # Since Punctuation, capitalization, and spaces are usually ignored while checking Palindrome,%0A    # we first remove them from our string.%0A    s = %22%22.join(%5Bcharacter for character in s.lower() if character.isalnum()%5D)
 %0A    return 

Update is_palindrome.py (#2025)