Home » Tip Bank » Web Development
  • Comment on this Article
Language: Web
Expertise: Intermediate
Mar 30, 2020

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Watch

Remove Occurrences of Characters Trailing Within a Given String

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"
Srinath M S
 
Submit a Tip
Browse "Web Development" Tips
Browse All Tips
htmlgoodies.com
html-color-codes.info