the first step of the second iteration will look like thisthe following is an implementation of the selection sort algorithm the argument to the function is the unsorted list of items we want to put in ascending order of magnitudedef selection_sort(unsorted_list)size_of_list len(unsorted_listfor in range(size_of_list)for in range( + size_of_list)if unsorted_list[junsorted_list[ ]temp unsorted_list[iunsorted_list[iunsorted_list[junsorted_list[jtemp the algorithm begins by using the outer for loop to go through the listsize_of_lista number of times because we pass size_of_list to the range methodit will produce sequence from through to size_of_list- it is subtle note the inner loop is responsible for going through the list and making the necessary swap any time that we encounter an element less than the element pointed to by unsorted_list[inotice that the inner loop begins from + up to size_of_list- the inner loop begins its search for the smallest element between + but uses the index