string.rstrip

Raymond Hettinger vze4rx4y at verizon.net
Sun Sep 28 04:01:04 CEST 2003


[Matthew Wilson]
> What would be the best way to strip off the last "_asdf" from
> "asdf_asdf_asdf"?

Hmm, if they are contiguous, how would you know
which one got stripped?   ;-)


Raymond Hettinger







More information about the Python-list mailing list