title: python: rstrip one exact string, respecting order
body: <p>Is it possible to use the python command <code>rstrip</code> so that it does only remove one exact string and does not take all letters separately? </p>
  
  <p>I was confused when this happened:</p>
  
  <pre><code>&gt;&gt;&gt;"Boat.txt".rstrip(".txt")
  &gt;&gt;&gt;'Boa'
  </code></pre>
  
  <p>What I expected was:</p>
  
  <pre><code>&gt;&gt;&gt;"Boat.txt".rstrip(".txt")
  &gt;&gt;&gt;'Boat'
  </code></pre>
  
  <p>Can I somehow use rstrip and respect the order, so that I get the second outcome?</p>