Home

On Tue, 31 Jul 2007 08:41:45 -0700, aleax@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
next

Re: Howto rethrow an exception outside a catch block?
Re: How to Modify Console output AFTER it has gone to cout
Get Only the Last Items in a Traceback
Re: Array of pointers. How to check index without failure?
Re: Zope review
Fundacja Sloneczko
Niechciane i Zapomniane
Mam Marzenie
Fundacja Hobbit
Kidprotect