title: Palindromic prime number in python
body: <p>So I'm trying to figure out how to find all the palindrome prime numbers between 2 numbers.
  So far my code can find the palindrome but when I check for a prime number, it prints out the non-primes as well. And there are numbers which are printed multiple times. </p>
  
  <p>Could you please help.</p>
  
  <p>Thanks.</p>
  
  <pre><code>a = 0
  b = 500
  a += 1   
  for i in range(a,b):
      if(str(i) == str(i)[::-1]):
          if(i&gt;2):
              for a in range(2,i):
                  y = True
                  if(i%a==0):
                      y = False
                      break
              if y:
                  print(i)
  </code></pre>