29讲 文件报错
Traceback (most recent call last):File "C:/Users/ALIENWARE/Desktop/python/筛选text中的语句.py", line 7, in <module>
for sentence in f:
UnicodeDecodeError: 'gbk' codec can't decode byte 0xbc in position 8: illegal multibyte sequence
代码运行显示这一段,是写错了吗?我查中文他好像也不是写错了的意思 with open('xxx.txt', encoding='utf-8') as f:
加红色字
页:
[1]