Bug in rstrip or what?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/6311968/python-rstrip-removes-one-additional-character">python .rstrip removes one additional character</a>  </p>
</blockquote>



<p>What is the problem here? it seems that rstrip removes more than necessary in the one to the last line of code.</p>

<pre><code>s = 'LedArray.py'
s.rstrip('y')
'LedArray.p'

s.rstrip('py')
'LedArray.'

s.rstrip('.py')
'LedArra'

s.rstrip('y.py')
'LedArra'
</code></pre>
