m = [] for i in range(5): n = [] for j in range(3): n.append(i*j) m.append(n)