dcsimg
 

Submitted by: Srinath M S(srinath_ms@yahoo.com)

Monday Mar 30th 2020 by Srinath M S

Language: Web, Expertise: Intermediate: See how to use the rstrip method to return the string with all occurrences of the trailing characters removed.

Use the rstrip method to return the string with all occurrences of the trailing characters removed.

For example:

inputString = "devxyyy"
inputString.rstrip("y") gives "devx"
Home
Mobile Site | Full Site