Easy Python
\nclass Solution(object):\n    def primePalindrome(self, N):\n        """\n        :type N: int\n        :rtype: int\n        """\n        \n        def reverse
```\nclass Solution(object):\n    def primePalindrome(self, N):\n        """\n        :type N: int\n        :rtype: int\n        """\n        \n        def reverse(n):\n            sm=0\n            while n>0:\n                r=n%10\n                sm=sm*10+r\n                n=n/10\n            return sm\n        \n        def isprime(n):\n            for i in range(2, int(n**.5)+1):\n                if n%i==0:\n                    return False\n            return True\n        \n        if N==1:\n            return 2\n        \n        while True:\n            if N==reverse(N) and isprime(N):\n                return N\n            N+=1\n            if 10**7 < N < 10**8:\n                N = 10**8\n```
[]