学习笔记(22):Python 面试100讲(基于Python3.x)-read、readline和readlines方法的区别

立即学习:https://edu.csdn.net/course/play/26755/340106?utm_source=blogtoedu

f=open(./files/readme.txt','r')

f.read(3)#读取前三个

f.seek(6)#指针到第6个

f.read(2)#从第六个后读取两个字符

发布了26 篇原创文章 · 获赞 2 · 访问量 273

猜你喜欢

转载自blog.csdn.net/qq_35504363/article/details/104387740