Open kangwonlee opened 2 years ago
import pprint
def new_mat(n_row, n_col):
result = [None] * n_row
for i in range(n_row):
result[i] = [0.0] * n_col
return result
B = new_mat(3, 3)
pprint.pprint(B, width=20)
B[0][0] = 3.0
pprint.pprint(B, width=20)