#C9602. Check Palindrome (Ignoring Case and Punctuation)
Check Palindrome (Ignoring Case and Punctuation)
Check Palindrome (Ignoring Case and Punctuation)
Given a string s, determine whether it is a palindrome by ignoring spaces, punctuation, and case differences. A palindrome is a string that reads the same backward as forward. For example, A man, a plan, a canal, Panama
should be considered a palindrome.
You need to read the input from standard input (stdin) and output the result to standard output (stdout). The output should be either True
or False
based on whether the string is a palindrome.
The check must filter out non-alphanumeric characters and treat uppercase and lowercase letters as equivalent.
inputFormat
The input consists of a single line containing a string s (possibly containing spaces and punctuation).
outputFormat
Output a single line: True
if the input string is a palindrome based on the given criteria, or False
otherwise.
A man, a plan, a canal, Panama
True