I tried to read this as a palindrome, backward, it works within one word with no spaces but doesn't with Taco Cat.
How do I join or get rid of spaces?
def is_palindrome():
    string = input("Enter a palindrome: ")
    string = string.lower()
    string = string.whitespace()
    rev_str = reversed(string)
    if list(string) == list(rev_str):
        print("True")
    else:
        print("False")
is_palindrome()
 
    