1 msg="我爱你中国" 2 3 print(msg.encode()) 4 print(b‘\xe6\x88\x91\xe7\x88\xb1\xe4\xbd\xa0\xe4\xb8\xad\xe5\x9b\xbd‘.decode())
encode,decode相互转化。
code转化
原文:https://www.cnblogs.com/guonf/p/14861262.html