input: Write a function to sort a list of integers in ascending order using the selection sort algorithm. The function should iterate through the list, find the minimum element and place it at the beginning. This process should be repeated for the remaining elements until the entire list is sorted. The function should return the sorted list.
  
  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([3, 4, 5, 1, 2])==[1, 2, 3, 4, 5]
  assert sort_ascending([3, 5, 10, 1, 2])==[1, 2, 3, 5, 10]
  assert sort_ascending([4, 3, 1, 2])==[1, 2, 3, 4]
  assert sort_ascending([3, 5, 4, 1, 2])==[1, 2, 3, 4, 5]
  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