Light Mode
Dark Mode
endless loop?

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

Created: Aug. 14, 2014, 3:47 a.m.
Updated: Aug. 16, 2014, 9:56 a.m.
0
10
User avatar
BasedKips