Thanks, I see how things work. I'm now using, say, >>> N = 3 >>> a = [] >>> for j in range(N): ... a.append(range(N)) to create a square matrix whose size is set by N (and I don't need to type thousands of elements for a big matrix).