title: Python: removing everything including and after a certain character on a line
body: <p>I have some text like so:</p>
  
  <pre><code>1.6 # blah blah blah
  # fjsadfklj slkjf yes 3.4
  1.8*
  1.9 1.10 #blah
  #blah
  1.11
  </code></pre>
  
  <p>I want to clean it up by removing all <code>#</code> characters plus anything following them on the same line. In other words, I desire:</p>
  
  <pre><code>1.6
  1.8*
  1.9 1.10
  1.11
  </code></pre>
  
  <p>What is the best way to approach this? Via simple methods like <code>partition</code>, or maybe regexes?</p>