array constructor

Kirill Simonov kirill at pmg17.vstu.vinnica.ua
Mon Feb 28 06:29:10 EST 2000


On Mon, 28 Feb 2000, Tom Holroyd wrote:
> I want a 4x4 array of zeros.

You may use dictionaries for this purpose.

m = {}
for i in range(4):
    for j in range(4):
        m[i,j] = 0

--
Kirill





More information about the Python-list mailing list