-
-
Save higgsmass/1a7cd17bc9c6e4097611e6acb58d2272 to your computer and use it in GitHub Desktop.
Generate all eight-digit palindromes
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 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