Hi,
I have a file with data written in a "matrix" form. In other words,
every row contains a fixed number of fields and I am interested in the
value of each field of every row.
I managed to read rows in the following way:
f = open('filename. dat','r')
for line in f:
x = line
f.close()
However, I cannot find out how to split every line into fields? What
should I do if I, let's say, need a value which is located in the
third row in the second column (field).
Thank you!
I have a file with data written in a "matrix" form. In other words,
every row contains a fixed number of fields and I am interested in the
value of each field of every row.
I managed to read rows in the following way:
f = open('filename. dat','r')
for line in f:
x = line
f.close()
However, I cannot find out how to split every line into fields? What
should I do if I, let's say, need a value which is located in the
third row in the second column (field).
Thank you!
Comment