方法一:使用NumPy库 import numpy as np 创建一个3x3的矩阵 matrix = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) 将矩阵保存为文本文件 np.savetxt('m...