def distance_to_array_center(v, arr):
    """
    Gives the distance from one element of the array to its center
    ex: (4, [3, 4, 5]) => 0 because 4 is in the middle of the array
    ex: (3, [3, 4, 5]) => 1 because 3 is 1 element away of the middle
    """
    array_center = len(arr) // 2
    i = arr.index(v)
    return abs(array_center - i)