SHARE
TWEET

Untitled

a guest Jun 15th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top