from itertools import product
palindromes = (i*j for i, j in product(range(100, 1000), repeat=2) if str(i*j) == str(i*j)[::-1])
print("O maior palíndromo encontrado foi", max(palindromes))
ZnJvbSBpdGVydG9vbHMgaW1wb3J0IHByb2R1Y3QKCnBhbGluZHJvbWVzID0gKGkqaiBmb3IgaSwgaiBpbiBwcm9kdWN0KHJhbmdlKDEwMCwgMTAwMCksIHJlcGVhdD0yKSBpZiBzdHIoaSpqKSA9PSBzdHIoaSpqKVs6Oi0xXSkKCnByaW50KCJPIG1haW9yIHBhbMOtbmRyb21vIGVuY29udHJhZG8gZm9pIiwgbWF4KHBhbGluZHJvbWVzKSk=