def find_closest_point(p, qs):
    """
    Return in index of the closest point in 'qs' to 'p'.
    """
    min_dist = None
    min_i = None
    for i, q in enumerate(qs):
        dist = abs(q-p)
        if min_dist is None or dist < min_dist:
            min_dist = dist
            min_i = i
    return min_i