会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
pengsuoqun123
博客园
首页
新随笔
联系
订阅
管理
2023年4月14日
python获取文件行数
摘要: 代码如下: file = r"2.txt"#引号内为文件路径 count = 1 fp = open(file, "r", encoding='utf-8') while 1: buffer = fp.read(8*1024*1024) if not buffer: break count += b
阅读全文
posted @ 2023-04-14 23:04 小彭先森
阅读(415)
评论(0)
推荐(0)
公告