Python rstrip

The Python rstrip method is used to remove the specified characters from the right-hand side of a string. By default, it removes trailing whitespace characters and returns a new string. The syntax of the Python rstrip string function is shown below. text.rstrip(Chars) Python rstrip string function Example The Python rstrip method returns a copy of … Read more