getting values from a text file (newby)

r rt8396 at gmail.com
Sun Feb 1 12:41:21 EST 2009


Try the csv module

py> import csv
py> reader = csv.reader(open(csvfile, "rb"))
py> for row in reader:
	print row


['1', 'house', '2,5 ']
['2', 'table', '6,7 ']
['3', 'chair', '-4,5 ']



More information about the Python-list mailing list