400 028 6601

建站动态

根据您的个性需求进行定制 先人一步 抢占小程序红利时代

python3-分割文本文件

#myhaspl@myhaspl.com
fId=1
with open("tf-allsrc.txt","r") as sf: 
    while True:
        with open("tf-src-"+str(fId)+".txt","w+") as f:
            data=sf.read(1024*1024*5)
            if not data:
                break
            f.write(data)
            print(fId,"#",end=".")
        fId+=1

分享标题:python3-分割文本文件
网页URL:http://mbwzsj.com/article/iheigd.html

其他资讯

让你的专属顾问为你服务