Sentences palindrome
Problem to find the given sentence palindrome or not. Case insensitive and space does not matter.
Example-1:
Input : s = "Top spot" Output : Yes
Example-2:
Input : s = "Never odd or even" Output : Yes
Example-2:
Input : s = "I see the cat" Output : No
Solution
s = "Top spot".lower() s = s.split() a = "".join(s) if(a==a[::-1]): print("Yes") else: print("No")
Output
Yes