Here is slow brute force way to find the largest palindromic product of three digit integers. You could do loop and break out of it if you go under the smaller number (the second one) of best solution found so far to be more efficient etc.
def pali(a): return str(a) == str(a)[::-1] print('Biggest palindromic product of two three digit integers is %i, which is %i * %i.' % max((a*b, a, b) for a in range(999, 100, -1) for b in range(a, 100000//a, -1) if pali(a*b))) """ Output: Biggest palindromic product of two three digit integers is 906609, which is 993 * 913. """
About the Author
IT Pro doing Eng-Fin-Eng translations