【Python】把结果写进文件

2021-04-15  本文已影响0人  吵吵人
    # 把结果写进文件
    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')
上一篇 下一篇

猜你喜欢

热点阅读