On 12/04/2012 08:48, Alan Gauld wrote:
On 12/04/12 03:31, questions anon wrote:
I am trying to simply write a list of values to txt file in one column.
I would then like to add another list in a second column.
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.
If it won't fit in memory use a simple database like SQLite to build the
table then print that out row by row.
Built-in zip? Or have I missed something?
Somehow they only appear as one long row.
You need to write newlines but you probably also want to use string
formatting to control the amount of space required so that your columns
line up.
HTH
--
Cheers.
Mark Lawrence.
_______________________________________________
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor