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