def solve(self, cipher):
        l = len(cipher)
        start = 0
        end = l - 1
        while start < end and cipher[start] == cipher[end]:
            start += 1
            end -= 1

        if self.__is_palindrome(cipher[:start] + cipher[start + 1:]):
            return start
        if self.__is_palindrome(cipher[:end] + cipher[end + 1:]):
            return end

        if start >= end:
            return -1
Algorithm:
dataset/ETHPy150Open algorhythms/HackerRankAlgorithms/Palindrome Index.py/Solution.solve