[Tutor] write list to columns

Alan Gauld alan.gauld at btinternet.com
Thu Apr 12 18:02:11 CEST 2012


On 12/04/12 15:32, Mark Lawrence wrote:

>> That's going to be quite awkward to do. Files like to be written one
>> complete line at a time. The normal approach would be to build up the
>> table structure in memory and then write the entire table out in one go.

>
> Built-in zip? Or have I missed something?

The OP specifically said he wanted to write out one *column* at a time 
to the file. Then go back and write the next column etc. zip would be 
one way to build the structure in memory prior to printing, as I suggested.

-- 
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/



More information about the Tutor mailing list