strip weirds
Robin Becker
robin at jessikat.fsnet.co.uk
Thu Dec 14 07:43:03 EST 2000
More information about the Python-list mailing list
Thu Dec 14 07:43:03 EST 2000
- Previous message (by thread): Close a tkinter window (not from win manager!)
- Next message (by thread): split weirds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Can somebody explain why strip behaves differently with and without an
argument?
>>> from string import split
>>> split(' ')
[]
>>> split(' ',' ')
['', '']
>>> split(' ')
[]
>>> split(' ',' ')
['', '', '']
>>>
with the default whitespace arg seems as though a run of whitespace is
being treated as a single character.
--
Robin Becker
- Previous message (by thread): Close a tkinter window (not from win manager!)
- Next message (by thread): split weirds
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list