is_palindrome(text) that returns True if text reads the same forwards and backwards (case-insensitive, ignoring spaces), and False otherwise.is_palindrome("Racecar")True
"racecar" reversed is still "racecar" once case is normalized.
is_palindrome("hello")False
"hello" reversed is "olleh", which does not match.
Normalize with text.lower().replace(" ", "") before comparing.
A string reversed with slicing is text[::-1].