代码
# -*- coding:utf-8 -*-
f=open(r'C:\Users\wy\Desktop\python\联系方式.txt')
for line in f:
print(line)
运行结果
UnicodeDecodeError Traceback (most recent call last)
<ipython-input-10-4854fdf4fd1a> in <module>
3 f=open(r'C:\Users\wy\Desktop\python\联系方式.txt')
4
----> 5 for line in f:
6 print(line)
UnicodeDecodeError: 'gbk' codec can't decode byte 0xac in position 6: illegal multibyte sequence
1
你用的什么语言啊