write whitespace/tab to a text file

dirkheld dirkheld at gmail.com
Fri Oct 19 16:33:29 CEST 2007


I would l like to write some data to a text file. I want to write the
data with whitespace or tabs in between so that I create tabular
columns like in a spreadsheet. How can I do this in python.
(btw, I'm new to python)

names = ['John','Steve','asimov','fred','jim']
## output I would like in txt file : John         Steve
asimov      fred     jim

	for x in range(len(names)):

More information about the Python-list mailing list