title: Remove sub-string from python string after comma
body: <p>I have a python string like this;</p>
  
  <pre><code>input_str = "2548,0.8987,0.8987,0.1548"
  </code></pre>
  
  <p>I want to remove the sub-string at the end after the last comma, including the comma itself.</p>
  
  <p>The output string should look like this;</p>
  
  <pre><code>output_str = "2548,0.8987,0.8987"
  </code></pre>
  
  <p>I am using python v3.6</p>