Palindrome - 3
This Program name is Palindrome - 2. Write a Python program to Palindrome - 3
The below link contains Palindrome - 3 question, explanation and test cases
https://drive.google.com/file/d/1ZELb2KSvV36MM4kiF-dTFTC43CeUiFH9/view?usp=sharing
We need exact output when the code was run
s = input('Enter your words: ')
s = s.lower()
s2 = s.split()
s3 = ''.join(s2)
if s3 == s3[::-1]:
print("True")
else:
print("False")
Enter your words: No melon no lemon
True
Enter your words: Race Cars
False
Comments
Leave a comment