#71 selection sort



def selectiveSort(nums):

   for iteration in range(len(nums)):
      
        minpos=iteration
         #the next iteration
        for j in range(iteration):
#check if you swap or keep
            if nums[j]>nums[minpos]:
#create temporary variable to 
#hold the numbers you are swapping

                minpos=j
                #swap
                temp=nums[iteration]
                nums[iteration]=nums[minpos]
                nums[minpos]=temp

        print(nums)


nums = [5,9,8,4,7,6,3,1,13,0]
selectiveSort(nums)
print(nums)



















Can you help me with my code? Can you check it and add notes ?