Python String – rstrip() method

It is a method string in python that removes all the leading characters from the right side of the string. It uses space as a default leading value. Leading characters can be one or many. Syntax: string.rstrip(leading_characters) Example 1: s = ”     CodeWindow     ” x = s.rstrip() print(x) Output:      CodeWindow Explanation: […]

Python String – rstrip() method Read More »