Skip to content

Instantly share code, notes, and snippets.

@higgsmass

higgsmass/pal_howmany_01.py Secret

Created Oct 8, 2020
Embed
What would you like to do?
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