#K54052. Palindrome Checker
Palindrome Checker
Palindrome Checker
In this problem, you are given a string and need to determine whether it is a palindrome. A palindrome is a string that reads the same forward and backward after removing all non-alphanumeric characters and ignoring cases and punctuation.
Formally, let ( s ) be the input string. Define its cleaned version as ( s' = \text{lower}(\text{re.sub}(r'[^A-Za-z0-9]', '', s)) ). The string is a palindrome if ( s' = (s')^R ), where ( (s')^R ) is the reversal of ( s' ). The answer should be printed as either "True" or "False" to standard output.
inputFormat
Input is read from standard input. It consists of a single line containing the string to be checked. The string may include spaces, punctuation, and a mix of upper and lower case letters.
outputFormat
Output is read from standard output. Print a single line: either "True" if the input string is a palindrome after cleaning, or "False" otherwise.## sample
A man, a plan, a canal: Panama
True