码迷,mamicode.com
首页 > 编程语言 > 详细

python3-分割文本文件

时间:2018-11-12 19:59:55      阅读:145      评论:0      收藏:0      [点我收藏+]

标签:pre   txt   code   with open   文本   文本文件   src   python   read   

#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-分割文本文件

标签:pre   txt   code   with open   文本   文本文件   src   python   read   

原文地址:http://blog.51cto.com/13959448/2315866

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!