getting values from a text file (newby)
Steve Holden
steve at holdenweb.com
Sun Feb 1 12:50:55 EST 2009
r wrote:
> 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 ']
And then, to conert the last field to numbers? ...
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list