title: Sort a list with certain values staying in constant positions
body: <p>I have a list of strings.  I want to only sort values that meet a certain condition. Consider this list</p>
  
  <pre><code>['foo','bar','testa','python','java','abc']
  </code></pre>
  
  <p>and I only want to sort the values with an <code>a</code> in them. The result should look like this</p>
  
  <pre><code>['foo','abc','bar','python','java','testa']
  </code></pre>
  
  <p>The elements with <code>a</code> will change places appropriately, but the other elements retain their original positions.</p>
  
  <p>I have absolutely no idea how to implement this, so I hope someone else does. Can someone show me how to do this?</p>