Created
October 12, 2016 07:44
-
-
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.
This file contains hidden or 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 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