title: Python double sort with split string
body: <p>I am trying to double sort something and it seems to be forgetting the first sort, I thought python uses stable sort so I am probably making a mistake.</p>
  
  <p>Original text is an array that looks like this:</p>
  
  <pre><code>benzene - 30.0 - 15
  xylene - 5.0 - 10
  benzene - 8.5 - 29
  benzene - 0.5 - 11
  </code></pre>
  
  <p>I want:</p>
  
  <pre><code>benzene - 0.5 - 11
  benzene - 8.5 - 29
  benzene - 30.0 - 15
  xylene - 5.0 - 10
  </code></pre>
  
  <p>Here is my code:</p>
  
  <pre><code>def akey(a):
      z = a.split(' -')
      v = [z[0]]
      x = [str(i) for i in v]
      return x
  
  def bkey(b):
      z = b.split(' -')
      v = [z[1]]
      x = [float(i) for i in v]
      return x
  
  labelList.sort(key=akey)
  labelList.sort(key=bkey)
  </code></pre>
  
  <p>Thanks for the help</p>