lreplace() and rreplace(): Replace the beginning and ends of a strings « Python recipes « ActiveState Code - http://code.activestate.com/recipes...
Jun 4, 2010
from
"Python newbies will often make the following mistake (I certainly have =)" < It's not only newbie, even a Google employee could misuse `lstrip` or `rstrip`, see <http://j.mp/aW6duW> and <http://j.mp/bKMYhR>. I was lucky to learn from someone's mistake instead of making my own. :)
- yjl