PYTHON
Palindrome Checker
A palindrome is a word, number, phrase, or other sequences\ of
characters which reads the same backward as forward.
(i.e. "racecar", "otto")
Implement a program that would take a string as an input() and
returns a Boolean value (True or False) that indicates
whether the inputted string is a palindrome or not.
Example Input: "kayak"
Example Output: True
Example Input: "palindrome"
Example Output: False
Example Input: "yay yay"
Example Output: True
Example Input: "abba"
Example Output: True
Example Input: "abca"
Example Output: False
Example Input: "x"
Example Output: True
Example Input: ""
Example Output: True
def is_palindrome(string):
for i in range(len(string)):
if string[i] != string[len(string) - i - 1]:
return False
return True
print(is_palindrome(input()))
PYTHON Palindrome Checker A palindrome is a word, number, phrase, or other sequences\ of characters which...