#C13220. Valid Palindrome Checker
Valid Palindrome Checker
Valid Palindrome Checker
Given a string s
, your task is to determine whether it is a valid palindrome. A palindrome is a string that reads the same backward as forward when considering only alphanumeric characters and ignoring cases.
Mathematically, for a string \( S \) (after removing non-alphanumeric characters and converting all letters to lowercase), the condition is:
\( S = S^R \)
where \( S^R \) is the reverse of \( S \).
You need to write a function that processes the input string and outputs True
if the string is a palindrome and False
otherwise.
inputFormat
The input contains a single line of text representing the string to be checked. This string may include spaces, punctuation, and special characters.
outputFormat
Output a single line: True
if the input string is a valid palindrome, or False
otherwise.
A man, a plan, a canal: Panama
True