Largest palindrome product
A quick look at bruteForce.


The built-in max computes the maximum value of a collection.
Nested loops can often be combined into a single loop using product, combinations, or combinations_with_replacement, depending on how you need to handle repetitions.
The loops go downwards from 999, but no use is made of this (no early exit) so you might as well let the loops go upwards, which is simpler.


Revised code:

from itertools import combinations_with_replacement

def palindrome(n):
    """Return True if n is a palindrome in base 10."""
    s = str(n)
    return s == s[::-1]

def problem4():
    """Return the largest palindrome made from the product of two 3-digit
    numbers.

    """
    return max(i * j
               for i, j in combinations_with_replacement(range(1000), 2)
               if palindrome(i * j))