How you chomp in python

Pete Jereb petejereb at
Sun Sep 21 04:57:20 CEST 2003

"Fernando Armenta" <farmenta at> wrote in message news:<mailman.1064022207.30931.python-list at>...
> How you cut off the ^M at the end of a line? rstrip is not working. 
> string.rstrip(build number)

Do you mean the newline character?  If your string variable is named
build_number, then

build_number = build_number.rstrip('/n')

works.  Sorry if this isn't what you meant.  But the format should be
the same.  If you did mean ^M then perhaps a hex or octal

More information about the Python-list mailing list