Hackbright Code Challenges

Is Palindrome: Solution

Is Palindrome: Solution

Problem

Is Palindrome

Whiteboard

Easier

Concepts

Loops, General

Download

is-palindrome-solution.zip


def is_palindrome(word):
    """Return True/False if this word is a palindrome."""

    # START SOLUTION

    for i in range(len(word) // 2):
        if word[i] != word[-i - 1]:
            return False

    return True