how to read a tab delimited file

Peter Hansen peter at engcorp.com
Tue Mar 15 23:37:50 EST 2005


jrlen balane wrote:
> how would i read a tab delimited file? at the same time put what i
> read in an array, say for example that i know that the file is an
> array with column= 5 and row=unknown.

Use the "csv" module.  Although that stands for "comma
separated values", it readily supports alternative
delimiters such as TAB.

-Peter



More information about the Python-list mailing list