def isPalindrome(string):
#termination condition: the string is one character or less
if (len(string) <= 1):
return True
if (string[0] == string[-1]):
return isPalindrome(string[1:-1])
else:
return False
def reverse(n, rev=0):
if n == 0:
return rev
rev = rev * 10 + (n % 10)
rev = reverse(n // 10, rev)
return rev
n = int(input("Enter a no.:"))
if n == reverse(n):
print(n,' is a Palindrome')
else:
print(n,' is not a Palindrome')