Answer to Question #221389 in Python for Hari nadh babu

Question #221389

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

1
Expert's answer
2021-08-05T03:01:44-0400
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

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS