input: Write a function to sort a list of numbers in ascending order using selection sort algorithm.
  assert sort([5, 3, 1, 4, 7, 2, 6]) == [1, 2, 3, 4, 5, 6, 7]
  assert sort([10, 9, 8, 7, 6, 5, 4, 3, 2, 1]) == [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
  assert sort([3, -2, -1, 5, 4, 0]) == [-2, -1, 0, 3, 4, 5]
  assert sort([]) == []
  assert sort([1]) == [1]
output: def sort(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