0 votes
in Python by
Can you please explain what is Rstrip() in Python Language?

1 Answer

0 votes
by

Python Language provides the rstrip() method which duplicates the string but leaves out the whitespace characters from the end.

The rstrip() escapes the characters from the right end based on the argument value, i.e., a string mentioning the group of characters to get excluded.

The signature of the rstrip() is:

str.rstrip([char sequence/pre>

#Example

test_str = 'Programming    '

# The trailing whitespaces are excluded

print(test_str.rstrip())

Related questions

0 votes
asked Aug 30, 2020 in Python by sharadyadav1986
0 votes
asked Aug 30, 2020 in Python by sharadyadav1986
...