Skip to content

Instantly share code, notes, and snippets.

@higgsmass
Last active October 8, 2020 19:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save higgsmass/1a7cd17bc9c6e4097611e6acb58d2272 to your computer and use it in GitHub Desktop.
Save higgsmass/1a7cd17bc9c6e4097611e6acb58d2272 to your computer and use it in GitHub Desktop.
Generate all eight-digit palindromes
def gen2():
pals = []
for i in range(10**3,10**4):
p = 11000*i - 9900* (i//10) - 990 * (i//100) - 99*(i//1000)
pals.append(p)
return pals
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment