Skip to content

Instantly share code, notes, and snippets.

@shieldsd
Created March 13, 2012 10:48
Show Gist options
  • Save shieldsd/2028100 to your computer and use it in GitHub Desktop.
Save shieldsd/2028100 to your computer and use it in GitHub Desktop.
Project Euler #4
def palindrome(n):
return n == int(str(n)[::-1])
print max((i * j for i in range(100, 1000)
for j in range(100, 1000)
if palindrome(i * j)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment