我在使用open()函数打开文件时,出现报错
SyntaxError: encoding problem: None
希望大lao可以帮助解决
f = open('a.txt', 'r', encoding='utf-8')
buf = f.read()
print(buf)
f.close()
调试出现提示
报错地方分别是
我在使用open()函数打开文件时,出现报错
SyntaxError: encoding problem: None
希望大lao可以帮助解决
f = open('a.txt', 'r', encoding='utf-8')
buf = f.read()
print(buf)
f.close()
调试出现提示