Number of rows = 18
cols= 10
Matrix = []
For I in xrange(0, line):
matrix.append([])
For j in xrange(0, cols):
Matrix [i]. Add (0)
Matrix [5][6]=3344
If you use numpy, this is its strength. There are examples in the tutorial. Copy them.
& gt& gt& gt from numpy import *
& gt& gt& gta = arange( 15)。 Plastic surgery (3, 5)
& gt& gt& gta
Array ([[ 0, 1, 2, 3, 4],
[ 5, 6, 7, 8, 9],
[ 10, 1 1, 12, 13, 14]])
There is also a tutorial here: http://hyry.dip.jp:8000/pydoc/numpy_intro.html.