How would you implement a selection sort algorithm?
Implement selection_sort(nums) to sort the input list of integers in ascending order. The algorithm must sort the list in place and return the sorted list. Do not call Python's built-in sorting functions.
Function: def selection_sort(nums):
Input: A list of integers. Output: The same list, sorted in ascending order.
def selection_sort(nums):