Skip to content

Instantly share code, notes, and snippets.

@BedirYilmaz
Created October 12, 2016 07:44
Show Gist options
  • Save BedirYilmaz/d98f32e3a06f9819b2784301c607ae2a to your computer and use it in GitHub Desktop.
Save BedirYilmaz/d98f32e3a06f9819b2784301c607ae2a to your computer and use it in GitHub Desktop.
Finding the largest palindrome made from the product of two 3-digit numbers.
def palindrome(str):
return str == str[::-1]
for i in range(100, 999):
for j in range(100,999):
if(palindrome(str(i*j))):
print(i*j)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment