title: Split file name by character
body: <p>I would like to split a file name using a specific character within the file name. For instance:</p>
  
  <pre><code>FileName = MyFile_1.1_A.txt
  (File, ext) = os.path.splitext(FileName)
  print File
  </code></pre>
  
  <p>This will give an output of:</p>
  
  <pre><code>MyFile_1.1_A
  </code></pre>
  
  <p>However, I would like to get an output of:</p>
  
  <pre><code>MyFile_1.1
  </code></pre>
  
  <p>How can I do this?</p>