Question #224621

s = input()
s = s.lower()
s2 = s.split()
s3 = ''.join(s2)
if s3 == s3[::-1]:
 print("True")
else:
 print("False")

In this python program it has three test cases, in this three test cases two test cases are getting expected output and third test case are not getting expected output. Please give me expexted output for three test cases. Thank you !

Question url :-

https://drive.google.com/file/d/1ZELb2KSvV36MM4kiF-dTFTC43CeUiFH9/view?usp=sharing

Test case - 1

Input

No lemon no melon

Output

True

 

Test case - 2

Input

Race Cars

Output

False

 

Test case - 3

Input

God’s Dog

Output

True


Expert's answer

string = ''.join(input().lower().replace("'", '').split())


if string == string[::-1]:
    print('True')
else:
    print('False')
LATEST TUTORIALS
APPROVED BY CLIENTS