Need help converting text to csv format

Tim Chase python.list at tim.thechases.com
Fri Nov 21 11:11:42 EST 2008


>  >>> qfields = ['"' + fld.strip() + '"' for fld in (num,desc,date)]
>  >>> out = qfields.join(',')

Just a quick note here to prevent the confusion of the OP...this 
should be

   ','.join(qfields)

-tkc







More information about the Python-list mailing list