Skip to content

Instantly share code, notes, and snippets.

@higgsmass
Created October 8, 2020 18:59
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/8fe96175da09cd2c0777551bc02558ba to your computer and use it in GitHub Desktop.
Save higgsmass/8fe96175da09cd2c0777551bc02558ba to your computer and use it in GitHub Desktop.
How Many Eight Digit Palindromes Are There?
b = 10**7
e = 10**8
count = 0
for i in range(b,e,1):
if str(i) == str(i)[::-1]:
count += 1
print (count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment