title: Python - quick sort - maximum recursion depth exceeded
body: <p>This is my code:</p>
  
  <pre><code>from random import randint
  
  def quick_sort(sort_me):
      if len(sort_me) &lt; 2:
          return sort_me
  
      pivot = sort_me[0]
  
      this = lower = upper = []
  
      for x in sort_me:
          if x &lt; pivot:
              lower.append(x)
          elif x &gt; pivot:
              upper.append(x)
          else:
              this.append(x)
  
      return quick_sort(lower) + this + quick_sort(upper)
  </code></pre>
  
  <p>And all I can see  in terminal is this:</p>
  
  <pre><code>File "sorts.py", line 19, in quick_sort
    return quick_sort(lower) + this + quick_sort(upper)
  RuntimeError: maximum recursion depth exceeded
  </code></pre>
  
  <p>I think something is wrong with <code>this</code> list but I don't know what. Help!</p>