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

Share the Post:
Share on facebook
Share on twitter
Share on linkedin

Related Posts