Am 04.10.2012 03:58 schrieb Steven D'Aprano:
alist = [[None]*2400 for i in range(2400)]
from random import randrange
for i in range(1000):
     x = randrange(2400)
     y = randrange(2400)
     adict[(x, y)] = "something"
     alist[x][y] = "something"

The actual sizes printed will depend on how sparse the matrices are, but
for the same above (approximately half full),

I wouldn't consider 1000 of 5760000 "half full"...


Thomas
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to