- 报错
UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position 16: illegal multibyte sequence - 原因
文档是中文,在open函数中没有指定编码类型 - 解决
fp = open('text.txt')
改成fp = open('text.txt',encoding='utf-8')
转载于:https://www.cnblogs.com/peng8098/p/11112188.html
fp = open('text.txt')
fp = open('text.txt',encoding='utf-8')
转载于:https://www.cnblogs.com/peng8098/p/11112188.html