python实现txt转word

def TXTRead_Writeline():

    ms=open("./file/test.txt") #读取文件

    for line in ms.readlines(): #逐行写入

        with open("./file/test.doc","a") as mon:

            mon.write(line)

TXTRead_Writeline()
    原文作者:Hoo-ah
    原文地址: https://blog.csdn.net/qq_43802146/article/details/116852122
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞