Matrix in python

Posted by Werner on Stack Overflow See other posts from Stack Overflow or by Werner
Published on 2010-06-08T17:56:46Z Indexed on 2010/06/08 18:02 UTC
Read the original article Hit count: 244

Filed under:
|

Hi,

I am very new to Python, I need to read numbers from a file and store them in a matrix like I would do it in fortran or C;

for i
  for j
    data[i][j][0]=read(0)
    data[i][j][1]=read(1)
    data[i][j][2]=read(2)
...
...

How can I do the same in Python? I read a bit but got confused with tuples and similar things

If you could point me to a similar example it would be great

thanks

© Stack Overflow or respective owner

Related posts about python

Related posts about matrix