Python 文件读取
来源:互联网 发布:飞扬软件手游 编辑:程序博客网 时间:2024/05/22 12:03
#coding=utf-8import codecs #编码包(中文)file=codecs.open('E:\\BaiduNetdiskDownload\\基础\\day6\\aaaa.txt','r','gbk','ignore') #文件路径,只读,中文编码,忽略打开错误提示while True: linestr=file.readline() if linestr!='': if linestr.find('吴东')!=-1: print(linestr) else : print('跳出循环') break
阅读全文
0 0
- Python文件读取说明
- python多线程读取文件
- Python-读取csv文件
- Python读取pcap文件
- python读取文件
- python 读取文件
- python读取CSV文件
- python读取文件小结
- Python文件的读取
- python读取文件
- python读取xml文件
- python 读取文件
- python读取大文件
- Python读取文件
- python读取文件
- python读取xml文件
- python读取xml文件
- python读取xls文件
- Exception in thread "http-bio-8080-exec-13" java.lang.OutOfMemoryError: PermGen space
- 在线License管理系统
- acronis disk director suite 11(硬盘无损分区工具)中文版
- 爬虫笔记(9/26)-----cookie的使用
- CSS,javascript简介
- Python 文件读取
- 2017 Rust 调查结果
- Android------第一次启动出现白屏或者黑屏
- Linux技术(1)--CentOS 6.5关闭防火墙步骤
- python __str__ ,__dict____str__ ,__unicode__
- 解决两个浮点数是否相等
- 大话设计模式——装饰者模式(总结)
- 常用的GDB命令
- java多线程基础介绍