In this Kata, you will check if it is possible to convert a string to a palindrome by changing one character. 

For instance:
```Haskell
solve ("abbx") = True, because we can convert 'x' to 'a' and get a palindrome. 
solve ("abba") = False, because we cannot get a palindrome by changing any character. 
solve ("abcba") = True. We can change the middle character. 
solve ("aa") = False 
solve ("ab") = True
```

Good luck!

Please also try [Single Character Palindromes](https://www.codewars.com/kata/5a2c22271f7f709eaa0005d3)

Difficulty: introductory

Starter code:

def solve(s):
	

Solutions:
def solve(s):
    v = sum(s[i] != s[-1-i] for i in range((len(s))//2) )
    return v == 1 or not v and len(s)%2

solve=lambda s:any(s[:y]+c+s[y+1:]==(s[:y]+c+s[y+1:])[::-1]!=s for y,x in enumerate(s)for c in set(s))

def solve(s):
    d = sum(1 for i in range(len(s) // 2) if s[i] != s[-i-1])
    return d == 1 or d == 0 and len(s) % 2 == 1

def solve(s):
    h = len(s) // 2
    diffs = sum(1 for a, b in zip(s[:h], s[-h:][::-1]) if a != b)
    return diffs == 1 or (diffs == 0 and len(s) % 2 == 1)

def solve(s):
    r = sum(a != b for a, b in zip(s, s[::-1]))
    return r == 2 or r == 0 and len(s)%2

def solve(s):
    r = sum([1 for i,x in enumerate(s[:len(s)//2]) if x!=s[-i-1]])
    return s==s[::-1] and len(s)%2 or r==1


def solve(s):
    if s == s[::-1] and len(s) % 2 == 0: return False
    
    start = 0
    end = len(s)-1
    mid = end//2
    count = 0
    while start < mid:
        for i in range(mid):
            if s[start] != s[end]:
                count += 1
            start += 1
            end -= 1
    if count <= 1:
        return True
    return False


def solve(s):
    if len(s) % 2 and s == s[::-1]:
        return True
    return len([c for i, c in enumerate(s[:len(s)//2]) if c != s[-(i+1)]]) == 1

def solve(s):
    dif = sum(a != b for a, b in zip(s, s[::-1]))
    return dif == 2 or not dif and len(s) & 1

def solve(s):
    return 1 == ((sum([op!=code for (op, code) in zip(s[0:len(s)//2:1], s[-1:len(s)//2-1:-1])]))|(len(s)%2))

def solve(s):
    r = sum(s[i] != s[-1-i] for i in range(len(s)//2))
    return r == 1 or (r == 0 and len(s) % 2)

def solve(s):
    n = sum(s[i] != s[-i - 1] for i in range(len(s) // 2))
    return True if n == 1 else n ==0 and len(s) % 2 != 0

def solve(s):    
    c=sum(s[i]!=s[-1-i] for i in range(len(s)//2))
    return c==1 or (c==0)*len(s)%2


def solve(s):
    t=s[::-1]
    return sum(x!=y for x,y in zip(s,t))==2 or (s!=t and len(s)==2) or (len(t)%2==1 and t[:len(t)//2]==s[:len(t)//2])

def solve(s):
    all = sum(1 for i in range(len(s) // 2) if s[i] != s[-i-1])
    return all == 1 or all == 0 and len(s)%2 == 1

def solve(s):
    r = [s[i] != s[len(s)-1-i] for i in range(len(s)//2)]
    if len(s)%2: return True if sum(r)<2 else False
    else: return True if sum(r)==1 else False

def solve(s):
    print(s)
    return True if len([x for y,x in enumerate(s) if s[y] != s[-(y+1)]]) == 2 else True if (len(s) % 2 and not [x for y,x in enumerate(s) if s[y] != s[-(y+1)]] ) else False

def solve(s):
    reversed = s[::-1]
    middle = len(s)//2
    count = 0
    
    for i in range(middle):
        if s[i] != reversed[i]:
            count += 1
    
    if middle*2 == len(s):
        if count == 1:
            return True
    else:
        if count == 0 or count == 1:
            return True
    return False

def solve(s):
    print(s)
    
    if s == s[::-1] and len(s) % 2 == 0: return False
    
    left, right = [], []
    l = list(s)
    counter = 0
    
    while l:
        e = l.pop(0)
        if l:
            e2 = l.pop()
            if e != e2 and counter == 0:
                e2 = e
                counter += 1
            right.insert(0, e2)
        else:
            e = left[-1]
        left.append(e)
        
    s = ''.join(left + right)
    
    return s == s[::-1]
        
        


def solve(n):
    s = [0, 1][len(n)%2]
    lh = n[:len(n)//2]
    hh = n[len(n)//2+s:]
    if s and lh == hh[::-1]:
        return True
    diffs = 0
    for u, v in zip(lh, hh[::-1]):
        if u != v:
            diffs += 1
        if diffs > 1:
            return False
    return diffs == 1