@@ -0,0 +1,751 @@
+%22%22%22%0A    Ref: https://www.hackerrank.com/challenges/palindrome-index%0A%22%22%22%0A%0A%0Adef is_palindrome(to_check, start, end):%0A    while start %3C end:%0A        if to_check%5Bstart%5D != to_check%5Bend%5D:%0A            return False%0A        start += 1%0A        end -= 1%0A    return True%0A%0A%0Adef palindrome_creation(letters):%0A    start = 0%0A    end = len(letters) - (1 + start)%0A    while start %3C end:%0A        end = len(letters) - (1 + start)%0A        if letters%5Bstart%5D == letters%5Bend%5D:%0A            start += 1%0A            continue%0A        if is_palindrome(letters, start + 1, end):%0A            return start%0A        else:%0A            return end%0A%0A    return -1%0A%0A%0Aif __name__ == '__main__':%0A    cases = int(input())%0A    for _ in range(cases):%0A        print(palindrome_creation(input()))%0A

Solved the string problem palindrome index