python3 UnicodeEncodeError: 'gbk' codec can't encode character '\xa0' in position 4400: illegal multibyte sequence
加上代码
import io import sys sys.stdout = io.TextIOWrapper(sys.stdout.buffer,encoding='gb18030')
原因:print()函数自身有限制,不能完全打印所有的unicode字符,python的默认编码不是'utf-8',改一下python的默认编码成'gb18030'