def is_palindrome(x): for i in range(0,len(x)): x = x.lower() if x[i::1] == x[::-1]: return("%s Is a palindrome" %(x)) else: return("%s Is not a palindrome" %(x)) print(is_palindrome('racecar')) Here is my palindrome program I was just wondering is it right? I checked using the words racecar and madam and it says they are palindrome and I tested nonpalindrome words and it worked. Can someone tell me if it is wrong and then correct me on my mistakes or If its right but there is an easier way can you show me?