#C14131. Palindrome Checker

    ID: 43747 Type: Default 1000ms 256MiB

Palindrome Checker

Palindrome Checker

In this problem, you are required to determine whether a given string is a palindrome. A palindrome is a word, phrase, or sequence that reads the same backward as forward, ignoring spaces, punctuation, and capitalization.

Your task is to implement a function that processes an input string and checks whether it is a palindrome. For example, the string "A man, a plan, a canal, Panama" is considered a palindrome because, after removing non-alphanumeric characters and converting to the same case, it reads the same backward and forward.

Note: You may assume the input consists of ASCII characters and its length is within manageable limits. Use \(\text{isalnum}(c)\) style checking if necessary.

inputFormat

Input will consist of a single line string which may include letters, digits, spaces, and punctuation.

outputFormat

Output a single line: print 'True' if the input string is a palindrome (ignoring spaces, punctuation, and capitalization), otherwise print 'False'.## sample

A man, a plan, a canal, Panama
True