其他分享
首页 > 其他分享> > appendString2Txt.py

appendString2Txt.py

作者:互联网

from DataCleaning.library.functions.changeDirectory import *

def appendString2Txt(string, target, targetPath = ""):
tempWD = os.getcwd()
if targetPath != "":
os.chdir(targetPath)
else:
development2Processed()
with open(target, "a", encoding='utf-8') as f:
f.write(string)
os.chdir(tempWD)

标签:chdir,os,appendString2Txt,py,tempWD,targetPath,string
来源: https://www.cnblogs.com/zhulimin/p/15369438.html