#K11351. Palindrome Checker
Palindrome Checker
Palindrome Checker
Given a string, determine if it is a palindrome. In this problem, 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. For example, "A man, a plan, a canal, Panama" is a palindrome. Note that the input will be provided via standard input (stdin) and the output should be printed to standard output (stdout).
If the input string is empty or contains only non-alphanumeric characters, it is considered a palindrome.
inputFormat
The input consists of a single line containing the string to be checked. The string may contain spaces, punctuation, and digits.
outputFormat
Output a single line: print True
if the given string is a palindrome according to the rules, otherwise print False
.
A man, a plan, a canal, Panama
True