#C14508. Palindrome Checker
Palindrome Checker
Palindrome Checker
Given a string, your task is to determine whether it is a palindrome, that is, it reads the same forward and backward after removing all non-alphanumeric characters and converting all letters to lowercase.
For convenience, define a function \(f(s)\) that first transforms the input string \(s\) into a normalized string by removing any characters that are not letters or digits and then converting it to lowercase. The string is then a palindrome if:
[ f(s) = \text{reverse}(f(s)) ]
Note that an empty string is considered a palindrome.
inputFormat
The input consists of a single line containing a string \(s\). The string may include spaces, punctuation, and mixed cases.
outputFormat
Print True
if the input string is a palindrome according to the above definition, otherwise print False
. The output is case-sensitive.
madam
True
</p>