p = list(input())
for i in range(len(p)):
if p[i] == p[len(p)-1-i]:
continue
else:
print("NOT PALINDROME")
break
else:
print("PALINDROME")
a=input('enter a string :')# palindrome in string
b=a[::-1]
if a==b:
print(a,'is a palindrome')
else:
print(a,'is not a palindrome')
print('a is not equal to b')
if a!=b:
print(b, 'the reverse of', a)
#output:
--------------------------------------------------------------------------------
case-I
# not palindrome
enter a string :1254
1254 is not a palindrome
a is not equal to b
4521 the reverse of 1254
--------------------------------------------------------------------------------
case-II
# palindrme
enter a string :12321
12321 is a palindrome
def check_palindrome(string):
length = len(string)
first = 0
last = length -1
status = 1
while(first<last):
if(string[first]==string[last]):
first=first+1
last=last-1
else:
status = 0
break
return int(status)
string = input("Enter the string: ")
status= check_palindrome(string)
if(status):
print("It is a palindrome ")
else:
print("Sorry! Try again")