Skip to content

Instantly share code, notes, and snippets.

@Sulverus
Last active August 29, 2015 14:05
Show Gist options
  • Save Sulverus/5eae35c5bf09f05c5c76 to your computer and use it in GitHub Desktop.
Save Sulverus/5eae35c5bf09f05c5c76 to your computer and use it in GitHub Desktop.
Prime Palindrome
"""
Code golf. Find first prime palindrome
115 chars=)
"""
def golf(n):
p=lambda s:s==s[::-1]
while True:
n+=1
if all([n%i for i in xrange(2,n)]) and p(str(n)):return n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment