input: Write a function to sort a list of numbers using the selection sort algorithm. The function should take a list as input and return a sorted version of the list.
  assert sort_list([4, 2, 6, 7, 1])==[1, 2, 4, 6, 7]
  assert sort_list([9, 3, 5, 2, 8])==[2, 3, 5, 8, 9]
  assert sort_list([])==[]
  assert sort_list([1, 1, 1, 1])==[1, 1, 1, 1]
  assert sort_list([2, 1])==[1, 2]
output: def sort_list(lst):
      for i in range(len(lst)):
          min_idx = i
          for j in range(i+1, len(lst)):
              if lst[j] < lst[min_idx]:
                  min_idx = j
          lst[i], lst[min_idx] = lst[min_idx], lst[i]
      return lst