我有两个函数可以用来创建一个数组:
def makelist(size):
list = []
for i in range(size):
list = list + [None]
return list
def mmatrix(rows,cols):
matrix = makelist(rows)
for i in range(rows):
matrix[i] = makelist(cols)
return matrix
当我创建一个数组:mmatrix(3,3))
时,它会在同一行打印所有三个数组。如何在数组之间插入新行?