#C12391. Palindrome Checker
Palindrome Checker
Palindrome Checker
This problem requires you to determine whether a given string is a palindrome. A palindrome is a sequence that reads the same backward as forward after ignoring case and non-alphanumeric characters. For example, "A man, a plan, a canal, Panama" is a palindrome. The challenge is to filter out any character that is not a letter or a digit and then check if the processed string is identical to its reverse.
The answer should be output as either True
or False
based on whether the string is a palindrome.
Note: An empty string is considered a palindrome.
inputFormat
The input consists of a single line containing a string s which may include spaces, punctuation, and mixed cases.
Input Method: Read from standard input (stdin).
outputFormat
Output a single line containing either True
if the processed string is a palindrome, or False
otherwise.
Output Method: Write to standard output (stdout).
## sampleA man, a plan, a canal, Panama
True