Aaron Sterling <dhaaron at hotpop.com> writes: > The second for loop should not be necessary. something like: > > spam = [] > for y in range(n): > spam.append([0] * n) You can also write that with map() as map(lambda y: [0] * n, range(n)) or with a list comprehension as [[0] * n for y in range(n)]. Hope this helps.