title: How to sort a list by an int-based string inside the list?
body: <p>I've been having some issues with some code lately and thought I'd share with this amazing community! </p>
  
  <p>I have a list of strings, that are also string-based lists, delimited by a special character ('~'). For example.. </p>
  
  <pre><code>list1 = [
  '0~A~Sometext',
  '56~B~Sometext',
  '3~A~Sometext',
  '875~G~Sometext',
  '54~V~Sometext',
  '3~D~Sometext',
  '20~S~Sometext',
  '7~R~Sometext'
  ]
  </code></pre>
  
  <p>I would like to sort this list based off the first element in the string (0,56,3,875,etc...) </p>
  
  <p>When I try to implement my own sorting algorithm or use Python's <code>sort</code>, it doesn't output the correct order.</p>