Selection sort
Another way to sort: find the smallest value in the whole list and swap it into the first position. Then find the smallest among the remaining positions and swap it into the second. Continue until every position has been filled with the smallest of what was left.
Write selection_sort(nums) that sorts the list in place using this method
and returns it. Do not use sort, sorted or min.
selection_sort([5, 1, 4, 2]) -> [1, 2, 4, 5]
def selection_sort(nums):
...