Skip to content

Instantly share code, notes, and snippets.

@shieldsd
Created April 3, 2012 09:27
Show Gist options
  • Save shieldsd/2290645 to your computer and use it in GitHub Desktop.
Save shieldsd/2290645 to your computer and use it in GitHub Desktop.
Project Euler #38
def pandigital(s):
return ''.join(sorted(s)) == '123456789'
print max(filter(pandigital, (str(n) + str(n * 2)
for n in range(9876, 9123, -1))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment