input: Write a function to implement a sorting algorithm that sorts a list of numbers in ascending order. The function should iterate through the list, find the minimum element in the unsorted portion, and swap it with the first element in that unsorted portion. This process is repeated until the entire list is sorted. If the input list is already sorted, it should remain unchanged.
  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]
  
  assert sort_list([4, 2, 6, 7, 1])==[1, 2, 4, 6, 7]
  assert sort_list([9, 8, 7, 6, 5])==[5, 6, 7, 8, 9]
  assert sort_list([1, 2, 3, 4, 5])==[1, 2, 3, 4, 5]
  assert sort_list([3, 1, 2])==[1, 2, 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]