[portland] Array writing question from landscape ecologist

John Naylor jcnaylor at gmail.com
Sat Mar 13 04:10:39 CET 2010


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


More information about the Portland mailing list