Check if a number with even number of digits is palindrome or not | Function to check if the number is palindrome ; if divisible by 11 then return True ; if not divisible by 11 then return False ; Driver code
def isPalindrome ( n ) : NEW_LINE INDENT if n % 11 == 0 : NEW_LINE INDENT return True NEW_LINE DEDENT return False NEW_LINE DEDENT if __name__ == " _ _ main _ _ " : NEW_LINE INDENT n = 123321 NEW_LINE if isPalindrome ( n ) : NEW_LINE INDENT print ( " Palindrome " ) NEW_LINE DEDENT else : NEW_LINE INDENT print ( " Not ▁ Palindrome " ) NEW_LINE DEDENT DEDENT