摘要: python中可以使用seek()移动文件指针到指定位置,然后读/写。通常配合 r+ 、w+、a+ 模式,在此三种模式下,seek指针移动只能从头开始移动,即seek(x,0) 。 f = open('test.txt','a+',encoding='utf-8') f.seek(3,0) f.wr 阅读全文
posted @ 2019-04-09 20:59 hello_libra 阅读(8047) 评论(0) 推荐(1) 编辑