On Thu, Nov 12, 2009 at 1:59 AM, ankita dutta <ankita.dutt...@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 -- http://mail.python.org/mailman/listinfo/python-list