Python 中struct.pack的一个疑问. importstructzzz="{Type:2}"a=struct.pack("s",zzz.encode("utf-8"))print(a)为什么输出结果是b'{'而不是我要的字符串转成的字节流?
確定! 回上一頁