Function Details: rstrip

Description


Returns a copy of the string with trailing characters removed.


Extended Description


The rstrip() method returns a copy of the string with trailing characters removed. If the chars argument is not provided, it removes trailing whitespace characters (space, tab, newline, return, formfeed).


Read More about rstrip from Python Documentation

Function Signature



Module: builtins

Class: str

Parameters



Parameter List


  • chars: str

Return



Return Type


str

Output

Explanation