title: Pop a substring from end of string efficiently
body: <p>Say I have a <code>big_string</code> of length <code>n</code> and I want to remove a substring of length <code>k</code> from its end</p>
  
  <p>we can do it as <code>big_string[:-k]</code>, but this will be of <code>O(n-k)</code>, can we do better than this, something like in<code>O(k)</code>?</p>