编写一个程序,生成一个10x10的随机矩阵并保存为文件(空格分隔行向量、换行分隔列向量),在写程序将刚才保存的矩阵文件另存为CSV格式,用Excel或文本编辑器打开看看结果对不对
importrandomdefs_txt(low,high,txtname):f=open("{}.txt".format(txtname),"w")forlineinrange(10):word=""forrowinrange(10):word=word+str(random.randrange(low,high))+""f.write(word+"\n")f.close()defs_csv(t