Python Palindrome
def palindrome(a):
return a == a[::-1]
palindrome('radar') # True
VasteMonde
def palindrome(a):
return a == a[::-1]
palindrome('radar') # True
value = input("Enter a Word: ")
if value == value[::-1] :
print(value)
print(value[::-1])
print("THIS WORD IS A PALINDROME")
else :
print(value)
print(value[::-1])
print("THIS WORD IS NOT A PALINDROME")
mes=input("Enter the word and see if it is palindrome ")
if mes==mes[::-1]:
print("This word is palindrome")
else:
print("This word is not palindrome")