title: Sort a list with a custom order in Python
body: <p>I have a list</p>
  
  <p><code>mylist = [['123', 'BOOL', '234'], ['345', 'INT', '456'], ['567', 'DINT', '678']]</code></p>
  
  <p>I want to sort it with the order of 1. <code>DINT</code> 2. <code>INT</code> 3. <code>BOOL</code></p>
  
  <p>Result:</p>
  
  <p><code>[['567', 'DINT', '678'], ['345', 'INT', '456'], ['123', 'BOOL', '234']]</code></p>
  
  <p>I've seen other similar questions in stackoverflow but nothing similar or easily applicable to me. </p>