explode()

Fred Atkinson fatkinson at mishmash.com
Tue Jul 14 02:36:26 EDT 2009


On Mon, 13 Jul 2009 22:32:55 -0700, Chris Rebert <clp2 at rebertia.com>
wrote:

>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

Chris, 

	You always seem to be waiting when I post a question.  Do you
ever sleep?  

	I wish the Python site was as well written as the PHP site. On
the PHP site, I can look up a command and they show not only the docs
on that command but a list of all other commands associated with it.  

	Thanks.  Python is a whole new animal to me.  I'm taking a
course in PHP and Python online right now.  I've done PHP scripting
before though I don't claim to be a whiz on it.  But I'd barely heard
of Python before I took this course.  

	The one thing I really dislike about Python over PHP is that
Python can usually only appear in the cgi directory (unless other
arragements are made with your hosting provider or if you reconfigure
Apache on your own server if you have your own).  With PHP, I can put
them in any folder on my Web site without any problem.  

	Regards, 




						Fred 



More information about the Python-list mailing list