title: Python how to realize sort with a customized encoding?
body: <p>Say there is a simple list and <code>sorted</code> then get following result:</p>
  
  <pre><code>s=['university','university','college','school']
  sorted(s)
  Out[6]: ['college', 'school', 'university', 'university']
  </code></pre>
  
  <p><code>sorted</code> will sort the list according to the inner encoding(utf-8 may be). I want to set a customized encoding. In the aboving example, I want to set a encoding as :<code>['university','college','school']</code>.I want sort  according to my customized encoding thus the result should be <code>sorted(s):['university','university','college','school']</code>.</p>
  
  <p>How can I realize it in Python?</p>