• endless loop?

Question related to mission Prime Palindrome Golf

 

Before attempting to reduce the characters in this code, could someone please review my attempt so far? i cant seem to find the flaw.. Thanks

def golf(number): x = number + 1 for i in range(2, x): if x % i == 0 or str(x) != str(x)[::-1]: golf(number + 1) return x

EDIT: RE -READ THE REQUIREMENTS. RECURSION LIMIT APPEARS TO BE ME FAULT