input: Write a Python function that, given a list of integers, returns the list sorted in an alternating order, starting with the smallest value, followed by the largest of the remaining values, then the smallest of the remaining, and so forth.
  assert alternating_sort([1, 2, 3, 4]) == [1, 4, 2, 3]
  assert alternating_sort([5, 6, 7, 8, 9]) == [5, 9, 6, 8, 7]
  assert alternating_sort([1, 2, 3, 4, 5]) == [1, 5, 2, 4, 3]
  assert alternating_sort([5, 6, 7, 8, 9, 1]) == [1, 9, 5, 8, 6, 7]
  assert alternating_sort([5, 5, 5, 5]) == [5, 5, 5, 5]
  assert alternating_sort([]) == []
  assert alternating_sort([1,2,3,4,5,6,7,8]) == [1, 8, 2, 7, 3, 6, 4, 5]
  assert alternating_sort([0,2,2,2,5,5,-5,-5]) == [-5, 5, -5, 5, 0, 2, 2, 2]
  assert alternating_sort([111111]) == [111111]
output: def alternating_sort(lst):
      lst.sort()
      result = []
      while lst:
          result.append(lst.pop(0))
          if lst:
              result.append(lst.pop(-1))
      return result