How about this: from copy import copy def zeromatrix (n, m): line = n * [0] matrix = map (copy, m * [line]) return matrix I agree with the guy who said you should check out Numeric Python, though. It will probably work out to be more flexible for you, in the long run. Alex.