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:
  1. def isPalidrome(theWord):
  2.     return (theWord==theWord[::-1])

Bookmark and Share

Post Info

Leave a Reply