# Right in the Center
_This is inspired by one of Nick Parlante's exercises on the [CodingBat](https://codingbat.com/java) online code practice tool._
Given a sequence of characters, does `"abc"` appear in the CENTER of the sequence?
The sequence of characters could contain more than one `"abc"`.
To define CENTER, the number of characters in the sequence to the left and right of the "abc" (which is in the middle) must differ by at most one.
If it is in the CENTER, return `True`. Otherwise, return `False`.
Write a function as the solution for this problem. This kata looks simple, but it might not be easy.
## Example
    is_in_middle("AAabcBB")  ->  True
    is_in_middle("AabcBB")   ->  True
    is_in_middle("AabcBBB")  ->  False
def in_centre(s,i):
    return s[i] == "a" and s[i+1] == "b" and s[i+2] == "c"

def is_in_middle(s):
    if "abc" not in s or len(s) < 3: return False
    l = len(s)
    if l % 2 == 1: i = (l+1)//2-2; return in_centre(s,i) 
    else: i1 = l//2 -2; i2 = l//2 -1; return in_centre(s,i1) or in_centre(s,i2) 

def in_centre(s,i):
    return s[i] == "a" and s[i+1] == "b" and s[i+2] == "c"

def is_in_middle(s):
    if "abc" not in s or len(s) < 3: return False
    l = len(s)
    if l % 2 == 1: i = (l+1)//2-2; return in_centre(s,i) 
    else: i1 = l//2 -2; i2 = l//2 -1; return in_centre(s,i1) or in_centre(s,i2) 
