def is_palindrome(num):
 reverse = 0
 num2 = num
 while (num2 > 0):
  reverse = ((10 * reverse) + (num2 % 10))
  num2 //= 10
 return (True if (reverse == num) else False)

def is_palindrome ( num ) : reverse = 0 num2 = num while ( num2 > 0 ) : reverse = ( ( 10 * reverse ) + ( num2 % 10 ) ) num2 //= 10 return ( True if ( reverse == num ) else False )
returns true if integer is a palindrome .