Use the rstrip method to return the string with all occurrences of the trailing characters removed.
For e.g.
inputString = “devxyyy”
inputString.rstrip(???y???) gives ???devx???
Home » Remove occurrences of a characters trailing within a given string
Use the rstrip method to return the string with all occurrences of the trailing characters removed.
For e.g.
inputString = “devxyyy”
inputString.rstrip(???y???) gives ???devx???