How to Check Whether a String is a Palindrome Using Python
Checking for a palindrome string in python is trivial due to built-in functions and powerful string indexing and slicing. The following python program checks whether a string input by user is a palindrome, input_str = input("Please enter a string: ").lower() if input_str == input_str[::-1]: print("{} is a palindrome".format(input_str)) else: print("{} is NOT a palindrome".format(input_str)) Even […]