title: I want to find out all the palindrome prime numbers between 2 numbers. My code can find the palindrome numbers but also prints the non primes
body: <p>Non-prime numbers are being printed because it checks only from '2-10' for prime numbers. How can I change the code to check for all numbers upto x?</p>
  
  <pre><code>N = eval(input("Enter the starting point N: \n"))
  M = eval(input("Enter the ending point M: \n"))
  
  n = str(N)
  
  i = 0
  
  
  for j in range(N, M):
      if (n[i] == n[len(n)-1]):
          x = N
          N = N + 1
          if not((x % 2 == 0) or (x % 3 == 0) or (x % 4 == 0) or (x % 5 == 0) or (x % 6 == 0) or (x % 7 == 0) or (x % 8 == 0) or (x % 9 == 0) or (x % 10 == 0)):
              print(x)
          n = str(N)
  
      else:
          N = N + 1
          n = str(N)
  </code></pre>