Python unicode转义字符\u的处理

python还有更为专业的方法来解决unicode转义字符问题,那就是unicode-escape编码。

s2 = "\u2121"

s = s2.decode("unicode-escape")

就可以了