title: Strip an ordered sequence of characters from a string
body: <p>I've realized recently that the <code>strip</code> builtin of Python (and it's children <code>rstrip</code> and <code>lstrip</code>) does not treat the string that is given to it as argument as an ordered sequence of chars, but instead as a kind of "reservoir" of chars:</p>
  
  <pre><code>&gt;&gt;&gt; s = 'abcfooabc'
  &gt;&gt;&gt; s.strip('abc')
  'foo'
  &gt;&gt;&gt; s.strip('cba')
  'foo'
  &gt;&gt;&gt; s.strip('acb')
  'foo'
  </code></pre>
  
  <p>and so on.</p>
  
  <p>Is there a way to strip an <em>ordered</em> substring from a given string, so that the output would be different in the above examples ?</p>