Python - multi-line array

Posted by Ockonal on Stack Overflow See other posts from Stack Overflow or by Ockonal
Published on 2010-04-13T14:16:32Z Indexed on 2010/04/13 14:23 UTC
Read the original article Hit count: 141

Filed under:
|

Hi guys, in c++ I can wrote:

int someArray[8][8];
for (int i=0; i < 7; i++)
   for (int j=0; j < 7; j++)
      someArray[i][j] = 0;

And how can I initialize multi-line arrays in python? I tried:

array = [[],[]]
for i in xrange(8):
   for j in xrange(8):
        array[i][j] = 0

© Stack Overflow or respective owner

Related posts about python

Related posts about array