Reading a two-column file into an array?
Gilles Ganault
nospam at nospam.com
Thu Aug 2 17:27:33 EDT 2007
More information about the Python-list mailing list
Thu Aug 2 17:27:33 EDT 2007
- Previous message (by thread): Catching SystemExit in C API code when embedding Python?
- Next message (by thread): Representation of new-style instance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Tue, 31 Jul 2007 08:41:45 -0700, aleax at mac.com (Alex Martelli) wrote: >That's what 2.5's with statement is all about...: Thanks everyone. Python power :-) from __future__ import with_statement import csv with open('import.csv', 'rb') as f: for item in list(csv.reader(f, delimiter='\t')): print item[0] + "," + item[1]
- Previous message (by thread): Catching SystemExit in C API code when embedding Python?
- Next message (by thread): Representation of new-style instance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list