Description:
Check whether a string is a palindrome.
Check whether a string is a palindrome.
Python Code
def is_palindrome(s):
s = s.lower().replace(" ", "")
return s == s[::-1]
print(is_palindrome("racecar"))
print(is_palindrome("hello"))
Expected Output
True
False