title: Quicksort, first element as pivot , quick code check
body: <p>Trying to do quicksort, with first element of the list as the pivot.</p>
  
  <p>Have been over this for hours, and just cannot find my mistake.</p>
  
  <pre><code>def quickSort(aList, l, r):
      #global count
      if l &lt; r:
          swap = l+1
          for run in range (l+1,r):            
              if aList[l] &gt; aList[run]:
                  aList[swap],aList[run]=aList[run],aList[swap]
                  swap += 1
              run += 1
          aList[l],aList[swap]= aList[swap],aList[l]
          quickSort(aList, l, swap-1)
          quickSort(aList, swap+1, r)
  
  
  testl=[4,6,3,7,2]
  print testl
  quickSort(testl,0,len(testl)-1)
  print testl
  </code></pre>
  
  <p>Output is :</p>
  
  <p>[4, 6, 3, 7, 2]</p>
  
  <p>[3, 6, 4, 2, 7]
  Anyone see where i went wrong ? The pivot element seems to be at the right place but other than that idk :(</p>