a="hello" c=a.encode(encoding='utf-8') a = b'hello' b="世界" b = b.encode(encoding='utf-8') print(a,b,c)
输出
b'hello' b'\xe4\xb8\x96\xe7\x95\x8c' b'hello' [Program finished]
a="hello" c=a.encode(encoding='utf-8') a = b'hello' b="世界" b = b.encode(encoding='utf-8') print(a,b,c)
输出
b'hello' b'\xe4\xb8\x96\xe7\x95\x8c' b'hello' [Program finished]
下一篇:不用中间变量交换a和b的值?
指法入门
宏,简单来说就是按预定义的规则来替换相应的文本内容,被替换的文本内容可以是对象也可以是函数。
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M