isPalindrome function in Python
I've started playing around with Python, and the more I do the more I like it. Python makes it very easy to do simple, scripty type stuff, but also has the ability to do OOP if that need arises.
Here's a quick little function to determine if a string passed is a palindrome or not.
PYTHON:
-
def isPalidrome(theWord):
-
return (theWord==theWord[::-1])
Post Info
| Posted | Sunday, June 28th, 2009 at 7:02 pm |
| Tags | Tags: python |