def palindrome(str):
    end = len(str)
    middle = (end >> 1)
    for i in range(middle):
        end -= 1
        if (str[i] != str[end]):
            return False
    return True
def palindrome(str):
    end = len(str)
    middle = (end >> 1)
    for i in range(middle):
        end -= 1
        if (str[i] != str[end]):
            return False
    return True