input: from typing import List
  
  def sort_list(array: List[int]) -> List[int]:
      """
      Sort a given list of numbers using selection sort algorithm.
      >>> sort_list([4, 2, 6, 7, 1])
      [1, 2, 4, 6, 7]
      """
      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
output:     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