Advertisement
Guest User

Untitled

a guest
Jun 15th, 2019
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def is_palindrom(purpose):
  2. const = 0
  3. count = 0
  4. appear = 9009
  5. while purpose >= const:
  6. news = count * appear
  7. if news > purpose:
  8. break
  9. news = str(news)
  10. news2 = news[::-1]
  11. if news == news2 and len(str(news)) == 3 and len(str(news2)) == 3:
  12. print(count, appear)
  13. count+=1
  14. purpose-=1
  15. is_palindrom(9009)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement