def closest_in_list(lst, val, num=2):
  """
    Returns two (`num` in general) closest values of `val` in list `lst`
    """
  idxs = sorted(lst, key=lambda x: abs(x - val))[:num]
  return sorted(list(lst).index(x) for x in idxs)