[python]写添加文本文件

代码:

#encoding=utf-8


# 生成文本 text="" for i in range(1,10): s = '%03d' % i url="https://abc.com/20181221/hBNS5261"+s+".ts" text=text+url+"\n"

# 将文本写入文件 with open('result.txt','a') as file_handle: file_handle.write(text)

2020年9月7日08点50分

posted @ 2020-09-07 08:50  不朽的飞翔  阅读(425)  评论(0编辑  收藏  举报