大概率是文件编码问题。读写文件时显式指定 encoding='utf-8': open('a.txt', 'r', encoding='utf-8')
另外编辑器保存也选 UTF-8。基本就能解决。
utf-8 永不为奴(划掉),确实编码问题占一半。