How to trim n characters from right end of a string?
paul.bissex at gmail.com
Sun Jun 27 02:04:27 CEST 2004
On Sat, 26 Jun 2004 23:45:42 GMT, Robert <nospam at nospam.net> wrote:
> Please tell this newbie how to remove n characters from the right end of a
What Tony said, plus this:
>>> s = "chopme"
>>> n = 2
>>> s = s[:-n]
>>> print s
paul bissex, e-scribe.com -- database-driven web development
More information about the Python-list