I really wanted to look at top solutions to see what I can do better next time, but it appears solutions aren't published for code golf. I got it down to 99 characters which is good for 173rd place right now, so I know there are at least 172 of you that can help me out. How can I do better?
I feel like there must be a way to get rid of one of the n+=1 parts, but can't find it.
def golf(n):
n+=1
while n-int(str(n)[::-1])or any(y for y in range(2,n)if not n%y):n+=1
return n
Created at: 2015/02/20 02:57; Updated at: 2015/02/20 11:20