query regarding file handling.
Chris Rebert
clp2 at rebertia.com
Thu Nov 12 05:15:24 EST 2009
On Thu, Nov 12, 2009 at 1:59 AM, ankita dutta <ankita.dutta09 at gmail.com> wrote:
> hi all,
>
> i have a file of 3x3 matrix of decimal numbers(tab separated). like this :
>
> 0.02 0.38 0.01
> 0.04 0.32 0.00
> 0.03 0.40 0.02
>
> now i want to read 1 row and get the sum of a particular row. but when i am
> trying with the following code, i am getting errors :
Try using the `csv` module, which despite its name, works on the
tab-delimited variant of the format as well:
http://docs.python.org/library/csv.html
Cheers,
Chris
--
http://blog.rebertia.com
More information about the Python-list
mailing list