input: def sort_list(array):
      """Sorts a given list of numbers using selection sort.
      >>> sort_list([4, 2, 6, 7, 1])
      [1, 2, 4, 6, 7]
      >>> sort_list([5, 3, 8, 6, 7, 2])
      [2, 3, 5, 6, 7, 8]
      """
output:     n = len(array)
      for i in range(n):
          min_idx = i
          for j in range(i+1, n):
              if array[j] < array[min_idx]:
                  min_idx = j
          array[i], array[min_idx] = array[min_idx], array[i]
      return array