initialize a dictionary

shama.bell at gmail.com shama.bell at gmail.com
Wed Mar 30 16:58:27 EST 2005


The F.A.Q. does not explain how to create a 2 dimensional array and
initialize it to zero.

I need to iterate values by row and column as well.

I tried this....
w,x = 32, 16
A = [ [0x0]*w for i in range(x)]
print A
It does not create a 2 dimensional array with 32 rows and 16 columns

Thanks,
-SB




More information about the Python-list mailing list