To Find Palindrome or Not

x = raw_input("enter the word to test palindrome:")

a = x[::-1]

if x==a :
print("The word is palindrome")

else:

print("The word is not a palindrome")

No comments:

Post a Comment