Some Python 2.1 ideas
Pete Shinners
pshinners at mediaone.net
Sat Dec 23 13:53:22 EST 2000
More information about the Python-list mailing list
Sat Dec 23 13:53:22 EST 2000
- Previous message (by thread): Some Python 2.1 ideas
- Next message (by thread): Some Python 2.1 ideas
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Bob Alexander" <bobalex at home.com> wrote > String method to remove trailing newline there is a string method named "strip()" that will remove all whitespace (newline&linefeeds included) from a string. actually, since strings are immutable, it returns a new string with the appropriate changes made. there are also "rstrip" and "lstrip" functions which will remove whitespace from only the end or beginning of the string. >>> print 'Example string gotten from readline\n'.strip() 'Example string gotten from readline'
- Previous message (by thread): Some Python 2.1 ideas
- Next message (by thread): Some Python 2.1 ideas
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list