input: Write a python function that takes a list of integers and returns the minimum of the averages formed by repeatedly removing and averaging the smallest and largest elements from the list until it's empty.
output: def min_average(nums):
      nums.sort()
      averages = []
      while nums:
          if len(nums) == 1:
              averages.append(nums.pop())
          else:
              smallest = nums.pop(0)
              largest = nums.pop()
              averages.append((smallest + largest) / 2.0)
      return min(averages)