title: How to reassign a string after removing parts of it by index
body: <p>I have a string</p>
  <pre><code>s = 'texttexttextblahblah&quot;,&quot;.'
  </code></pre>
  <p>and I want to cut of some of the rightmost characters by indexing and assign it to <code>s</code> so that <code>s</code> will be equal to <code>texttexttextblahblah&quot;</code>.</p>
  <p>I've looked around and found how to print by indexing, but not how to reassign that actual variable to be trimmed.</p>