maths.is_int_palindrome

Functions

is_int_palindrome(→ bool)

Returns whether num is a palindrome or not

Module Contents

maths.is_int_palindrome.is_int_palindrome(num: int) bool

Returns whether num is a palindrome or not (see for reference https://en.wikipedia.org/wiki/Palindromic_number).

>>> is_int_palindrome(-121)
False
>>> is_int_palindrome(0)
True
>>> is_int_palindrome(10)
False
>>> is_int_palindrome(11)
True
>>> is_int_palindrome(101)
True
>>> is_int_palindrome(120)
False