摘要: # encode 编码 str ---> bytes s1 = 'alex' s2 = s1.encode('utf-8') s3 = s1.encode('gbk') print(s2) print(s3) m1 = '中国' m2 = m1.encode('utf-8') m3 = m1.encode('gbk') print(m2) print(m3) # py3: # 文件的储存,传输... 阅读全文