python_二进制转换
程序员文章站
2022-04-06 15:14:25
...
msg="我爱北京*"
print(msg)
print(msg.encode(encoding="utf-8"))#转成二进制
print(msg.encode(encoding="utf-8").decode("utf-8"))#转成utf-8