diff --git a/src/Python/utils.py b/src/Python/utils.py index 1cea441..6be3763 100644 --- a/src/Python/utils.py +++ b/src/Python/utils.py @@ -41,4 +41,8 @@ def list_primality(n): # Returns all the prime numbers less than or equal to n, in ascending order # For example: list_primes(97) = [2, 3, 5, 7, 11, ..., 83, 89, 97]. def list_primes(n): - return [i for (i, is_prime) in enumerate(list_primality(n)) if is_prime] \ No newline at end of file + return [i for (i, is_prime) in enumerate(list_primality(n)) if is_prime] + + +def is_palidrome(num): + return str(num) == str(num)[::-1] \ No newline at end of file