title: Duplicate problems with Selection Sort
body: <p>If I have a list where all values are unique, the code runs fine. However, if there is a duplicate value within the list, when finding the minimum value for the next iteration, it pulls from the entire list rather than just the remainder of the list.</p>
  
  <pre><code>for n in range(0,len(lst)):
      a = min(lst[n:])  #minimum value within remainder of set
      i = lst.index(a)  #index value for minimum value within remainder of set    
  
      temp = lst[n]
      lst[n] = a
      lst[i] = temp
  </code></pre>
  
  <p>Results look like this:</p>
  
  <pre><code>lst = [6, 8, 9, 1, 3, 4, 7, 5, 4]
  
  [1, 8, 9, 6, 3, 4, 7, 5, 4]
  [1, 3, 9, 6, 8, 4, 7, 5, 4]
  [1, 3, 4, 6, 8, 9, 7, 5, 4]
  [1, 3, 6, 4, 8, 9, 7, 5, 4]
  [1, 3, 6, 8, 4, 9, 7, 5, 4]
  [1, 3, 6, 8, 9, 4, 7, 5, 4]
  [1, 3, 6, 8, 9, 7, 4, 5, 4]
  [1, 3, 6, 8, 9, 7, 5, 4, 4]
  [1, 3, 6, 8, 9, 7, 5, 4, 4]
  </code></pre>
  
  <p>I'm looking for it to return this:</p>
  
  <pre><code>[1, 3, 4, 4, 5, 6, 7, 8, 9]
  </code></pre>