# 把结果写进文件
path = r"E:\CACode\result\se\pre\clusterTest\Ctest.txt"
with open(path, 'w') as f:
for i in range(N_TYPE):
for j in info[i]:
f.write(str(i) + r'、' + str(j) + '\n')
# 把结果写进文件
path = r"E:\CACode\result\se\pre\clusterTest\Ctest.txt"
with open(path, 'w') as f:
for i in range(N_TYPE):
for j in info[i]:
f.write(str(i) + r'、' + str(j) + '\n')
本文标题:【Python】把结果写进文件
本文链接:https://www.haomeiwen.com/subject/cifbkltx.html
网友评论