def ispal(word): if word[::-1] == word: return True; else: return False print(ispal("racecar"))