Lower case letters and check the given string is palindrome or not | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Lower case letters and check the given string is palindrome or not

14th Mar 2017, 5:19 AM
sivaji
3 Answers
+ 7
Or you can try to do it with no 'if' statement: https://code.sololearn.com/cR4DVjNP4rXd/?ref=app
14th Mar 2017, 8:55 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 2
@ Kuba, Nice!
14th Mar 2017, 8:57 PM
Elric Hindy
Elric Hindy - avatar
+ 1
# condensed to 3 lines in an infinite loop, puts all to lowercase to ignore case issues. while(True): x = input("Enter Your Palindrome: ").lower() print("It's a Palindrome!") if x == x[::-1] else print ("That's not a Palindrome silly monkey!")
14th Mar 2017, 5:32 AM
Elric Hindy
Elric Hindy - avatar