Skip to content

Instantly share code, notes, and snippets.

@Jaykul
Created August 2, 2012 01:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jaykul/3232278 to your computer and use it in GitHub Desktop.
Save Jaykul/3232278 to your computer and use it in GitHub Desktop.
Test-Palindrome
def testPalindrome(p):
p = str(p)
return not any([True for i in range(0,len(p)/2) if p[i] <> p[-i-1]])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment