f = open('fileName') char = f.read(1) while char: process(char) char = f.read(1) f.close()
收藏
0人收藏
- 2015-11-27 20:36:13Iterating Over Lines with readlines by 张宋付
- 2016-01-04 17:35:46Closing Files by 西国の海妖
- 2016-08-19 15:46:08Working with Directories by 西国の海妖
- 2016-09-03 11:47:53Define function to Open a file by 阮小七
- 2016-09-19 19:25:12File Output by jack.chen
- 2016-10-19 10:47:50Handling I/O Errors by 大猪
- 2016-12-06 09:03:52Demonstrates writing to a text file by 张宋付
- 2016-03-26 20:56:22Reading Everything: read the whole file in one go by 风云轩
- 2016-08-19 15:55:27Working with File Objects by Solon.Ring
- 2016-09-03 14:35:51Writing to Files by 西国の海妖
- 2016-10-19 11:28:30Reads a single line from the file by 蟋蟀MM
相关聚客文章
- Fastest way to unzip a zip file in Python
- 通过 shell 执行 python 报错: No such file or directory
- Python模拟登录新浪微薄(使用RSA加密方式和Cookies文件)
- python爬虫入门
- python里的三目运算
- Python操作mysql(增删改查)
- 使用Tornado进行网络异步编程
- Python vs R : 在机器学习和数据分析领域中的对比
- 采用pelican静态blog
- 像Excel一样使用python进行数据分析-(3)
- 解决HTMLTestRunner中文显示乱码的问题
- 密码保护:免登录新浪微博爬虫系列之第一篇 单博主微博及评论数据