input: Write a function to sort a list of numbers using the selection sort algorithm. The function should modify the given array in place. If the given array is empty, the function should return the empty array.
  def sort_list(array): 
      n = len(array) 
      for i in range(n): 
          min_idx = i 
          for j in range(i+1, n): 
              if array[min_idx] > array[j]: 
                  min_idx = j 
          array[i], array[min_idx] = array[min_idx], array[i] 
      return array
  
  assert sort_list([4, 2, 6, 7, 1])==[1, 2, 4, 6, 7]
  assert sort_list([5, 3, 8, 6, 7, 2])==[2, 3, 5, 6, 7, 8]
  assert sort_list([9, 7, 5, 3, 1])==[1, 3, 5, 7, 9]
  assert sort_list([3, 3, 3, 2, 2, 1])==[1, 2, 2, 3, 3, 3]
  assert sort_list([])==[]
output: def sort_list(array): 
      n = len(array) 
      for i in range(n): 
          min_idx = i 
          for j in range(i+1, n): 
              if array[min_idx] > array[j]: 
                  min_idx = j 
          array[i], array[min_idx] = array[min_idx], array[i] 
      return array