直接上代码:name = "你好,中国人"byteName = bytes(name.encode("utf-8"))print(byteName)for b in byteName : print(bin(b),end="\t")
pyhton3.5将汉字转成二进制的方法
原文:http://www.cnblogs.com/wyx1202/p/7278870.html