#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = 'jiangwenwen' # 从文件中按行读取数据 file = open("D:\坚果云\我的坚果云\\2019年计划.txt") while 1: lines = file.readlines(100000) if not lines: break for line in lines: print(line)
0.2 2016.09.26 11:28* 字数 216 阅读 8053评论 2喜欢 5 最近一段时间的学习中发现,Python基本和中文字符杠上了.如果能把各种编码问题解决了,基本上也算对Python比较熟悉了. For UTF-8 encoding, Excel requires BOM (byte order mark) codepoint written at the start of the file or it will assume ANSI encoding, which is