Loading...
Loading...
Loading...
A form field must hold a palindrome. Ignore letter case and every character that is not a letter or digit. Print Yes or No.
Example 1
Input
A man, a plan, a canal: Panama
Output
Yes
Yes after cleaning.
Example 2
Input
race a car
Output
No
Not symmetric.
Try the problem first. Open one hint at a time.
Compare the first and last useful characters, then move inward.
Skip a character with isalnum() false, and compare with lower().
Write your Python code, run it on the examples and submit it to hidden tests.
Solve in the editor