会员
周边
新闻
博问
AI培训
云市场
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
Loading...
高宏宇
业精于勤而荒于嬉,行成于思而毁于随
首页
管理
2023年8月24日
Python文件读取和写入方法
摘要: ## 读取 ``` # 通过单字符串空格分隔 def count_words(filepath): with open(filepath, 'r') as file: string = file.read() string_list = string.split(" ") return len(st
阅读全文
posted @ 2023-08-24 14:49 高宏宇
阅读(13)
评论(0)
推荐(0)
编辑
公告