fork download
  1.  
  2. def isPalindrome(a):
  3. return str(a) == str(a)[::-1]
  4.  
  5. max_pal=0
  6. start=100
  7. end=999
  8.  
  9. for i in range(start, end):
  10. for j in range(i,end):
  11. product=i*j
  12. if isPalindrome(product):
  13. if i*j > max_pal:
  14. max_pal = i*j
  15. print("The number you are looking for is : ")
  16. print max_pal
Success #stdin #stdout 0.06s 65232KB
stdin
Standard input is empty
stdout
The number you are looking for is : 
906609