Python Function Reference

rstrip
Return a copy of the string with trailing characters removed.
Python 3.13
str.rstrip([chars])
chars
The characters to be removed (defaults to whitespace).
Examples
Python 3.13
>>> 'hello  '.rstrip()
'hello'