Created
January 8, 2015 06:03
-
-
Save jamespenguin/ce159c6f0946a2ae34c9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def is_palindrome(number): | |
s = str(number) | |
r = list(s) | |
r.reverse() | |
return "".join(r) == s | |
results = [] | |
for num_1 in range(999, 99, -1): | |
for num_2 in range(999, 99, -1): | |
if is_palindrome(num_1 * num_2): | |
results.append(num_1 * num_2) | |
results.sort() | |
print results[-1] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment