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.
  def sort_ascending(nums):
      for i in range(len(nums)):
          min_idx = i
          for j in range(i + 1, len(nums)):
              if nums[min_idx] > nums[j]:
                  min_idx = j
          nums[i], nums[min_idx] = nums[min_idx], nums[i] 
      return nums
  
  assert sort_ascending([1, 5, 3, 2, 4])==[1, 2, 3, 4, 5]
  assert sort_ascending([10, 9, 8, 7, 6])==[6, 7, 8, 9, 10]
  assert sort_ascending([1])==[1]
  assert sort_ascending([3, 3, 3])==[3, 3, 3]
  assert sort_ascending([])==[]
output: def sort_ascending(nums):
      for i in range(len(nums)):
          min_idx = i
          for j in range(i + 1, len(nums)):
              if nums[min_idx] > nums[j]:
                  min_idx = j
          nums[i], nums[min_idx] = nums[min_idx], nums[i] 
      return nums