Typically, spaces and punctuation are ignored when checking for palindromes. You can remove them from the input string before performing the palindrome check.