Skip to content

Instantly share code, notes, and snippets.

@madfriend
Created March 24, 2012 06:53
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 madfriend/2179172 to your computer and use it in GitHub Desktop.
Save madfriend/2179172 to your computer and use it in GitHub Desktop.
def isPalindrome(word):
if len(word)<2:
return boolean(word)
return (word[0] is word[-1]) ? IsPalindrome(word[1:-2]) : False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment