input: Write a function to implement a sorting algorithm that sorts a given list in ascending order by selecting the smallest element in the subarray from the current index to the end of the list and swapping it with the element at the current index. The function should return the sorted list. If the input list is empty, the function should return an empty list.
  assert sort_list([1, 5, 7, 8, 4, 10, 2])==[1, 2, 4, 5, 7, 8, 10]
  assert sort_list([3, 2, 1])==[1, 2, 3]
  assert sort_list([9, 8, 7, 6])==[6, 7, 8, 9]
  assert sort_list([])==[]
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