explode()

Chris Rebert clp2 at rebertia.com
Tue Jul 14 07:32:55 CEST 2009


On Mon, Jul 13, 2009 at 11:28 PM, Fred Atkinson<fatkinson at mishmash.com> wrote:
> On Sat, 11 Jul 2009 18:50:28 -0700, Chris Rebert <clp2 at rebertia.com>
> wrote:
>
>>On Sat, Jul 11, 2009 at 7:41 PM, Fred Atkinson<fatkinson at mishmash.com> wrote:
>>>        What is the Python equivalent of the PHP explode() function?
>>
>>some_string.split("separator")
>>
>>Cheers,
>>Chris
>
>     What would the equivalent of the PHP function implode be?

"separator".join(a_list_of_strings)

I would recommend you read the Python manual's section on string methods:
http://docs.python.org/library/stdtypes.html#string-methods

Cheers,
Chris
-- 
http://blog.rebertia.com



More information about the Python-list mailing list