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"
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"