new string method in 2.5 (partition)

Lawrence Oluyede rhymes at myself.com
Tue Sep 19 15:12:14 EDT 2006


richard.charts at gmail.com <richard.charts at gmail.com> wrote:

> What's the difference between this and string.split?

>>> ('http://www.python.org').partition('://')
('http', '://', 'www.python.org')
>>> ('http://www.python.org').split('://')
['http', 'www.python.org']



-- 
Lawrence - http://www.oluyede.org/blog
"Nothing is more dangerous than an idea
if it's the only one you have" - E. A. Chartier



More information about the Python-list mailing list