# Title: Palindrome string check
# Heading: Python Program to Check if a String Is a Palindrome
# Level: beginner
# Tags: palindrome, reverse a string, string slicing, isalnum
# About: Checks whether a word or sentence reads the same backwards as forwards, ignoring capitals, spaces and punctuation.

def is_palindrome(text):
    """True if text is a palindrome, ignoring case and symbols."""
    # Keep only the letters and digits, in lower case
    cleaned = ""
    for char in text:
        if char.isalnum():
            cleaned += char.lower()
    return cleaned == cleaned[::-1]


print("Madam:", is_palindrome("Madam"))
print("Never odd or even:", is_palindrome("Never odd or even"))
print("Python:", is_palindrome("Python"))
