[portland] Array writing question from landscape ecologist

Ray Parrish crp at cmc.net
Sat Mar 13 12:59:29 CET 2010

John Naylor wrote:
> On Fri, Mar 12, 2010 at 5:24 PM, Ray Parrish <crp at cmc.net>
>>>          for line in data4:
>>>              outfile.write(','.join([str(item) for item in line]))
>> Could you please explain to me what the ','.join() is doing in your write
>> command?
> See here:
> http://www.python.org/doc/faq/general/#why-is-join-a-string-method-instead-of-a-list-or-tuple-method
> John
OK, I asked again too quick, after reading a reply from Ethan, I now 
understand that it is the separator string for the call to join(). The 
syntax just looked strange to me at first.

Later, Ray Parrish

Linux dpkg Software Report script set..
Ray's Links, a variety of links to usefull things, and articles by Ray.
Writings of "The" Schizophrenic, what it's like to be a schizo, and other
things, including my poetry.

More information about the Portland mailing list