Palindrome Sentence
Easy 20 XPStringsTwo Pointers
Commonly asked at Amazon, Microsoft, Facebook
Read a line. Ignoring case and every character that is not a letter or digit, print Yes if it is a palindrome, otherwise No.
- Input
- One line of text.
- Output
- Yes or No.
Sample 1
Input
A man, a plan, a canal: Panama
Output
Yes
Sample 2
Input
race a car
Output
No
Read input with input() (no prompt message) and print only the answer. Run tries the Input box; Submit checks all test cases.
Output Loading Python (first time takes a few seconds)
Press Run to see the result here.The solution unlocks after 3 submissions.