input: Write a python function to sort a list of numbers using a selection sort algorithm.
  assert sort_list([4, 2, 7, 1, 9]) == [1, 2, 4, 7, 9]
  assert sort_list([10, 5, 3, 8, 2, 6, 4, 7, 1, 9]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  assert sort_list([20, 15, 30, 25, 10, 5]) == [5, 10, 15, 20, 25, 30]
output: def sort_list(arr):
      n = len(arr)
      for i in range(n):
          min_idx = i
          for j in range(i+1, n):
              if arr[j] < arr[min_idx]:
                  min_idx = j
          arr[i], arr[min_idx] = arr[min_idx], arr[i]
      return arr