read、readline 和 readlines 的区别?

read:读取整个文件。

readline:读取下一行,使用生成器方法。

readlines:读取整个文件到一个迭代器以供我们遍历。

发表评论

后才能评论

评论(1)