#C13129. Palindrome Checker
Palindrome Checker
Palindrome Checker
The goal of this problem is to determine whether a given string is a palindrome.
A string is considered a palindrome if, after removing all non-alphanumeric characters and converting all letters to lowercase, the string reads the same forward and backward. In other words, if we denote the cleaned string as \( S \), then the condition is:
\( S = \text{reverse}(S) \)
You are required to read a single line of input from standard input and output True
if the string is a palindrome, or False
otherwise.
inputFormat
The input consists of a single line containing a string S. The string may include letters, digits, spaces, and punctuation.
outputFormat
Output a single line to standard output. Print True
if the cleaned version of the string is a palindrome; otherwise, print False
.
A man, a plan, a canal, Panama
True