今日分享 · 文本十六进制_编码转换2(Python)    前些天分享了一次这个内容,但是昨晚实际使用的时候,发现并不是我想要的效果。于是稍微修改了一下,并分享一个新的方法。# coding=utf-8with open ('./yan.txt', 'r', encoding = 'utf-8') as rf: for line in rf.readlines(): data = eval(repr(line.encode('utf-8')).replace('\\\\', '\\')).decode('utf-8', 'ignore') print(data)上期链接:编码转换(Python)  ←点击跳转