input: Write a function to implement a sorting algorithm in Python that takes a list of integers as input and outputs the list sorted in ascending order. The function should use a selection sort approach.
  assert sort_ascending([5, 3, 8, 6, 7, 2])==[2, 3, 5, 6, 7, 8]
  assert sort_ascending([9, 1, 5, 3, 2, 6])==[1, 2, 3, 5, 6, 9]
  assert sort_ascending([])==[]
  assert sort_ascending([1])==[1]
output: def sort_ascending(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