[Tutor] write list to columns
Alan Gauld
alan.gauld at btinternet.com
Thu Apr 12 09:56:53 CEST 2012
On 12/04/12 06:33, questions anon wrote:
> Perfect, thank you.
> Is there a way I could easily/quickly add headings to each column?
Headings are no different to any other line of text...
> with open('output.txt', 'w') as f:
write your headings here
> for record in records:
> f.write(output_format %(record))
> f.write('\n')
>
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list