python encode和decode的妙用

狗狗赢 10 0 PDF 2021-01-01 01:01:50

>>> “hello”.encode(“hex”) ‘68656c6c6f’ 相应的还可以 >>> ‘68656c6c6f’.decode(“hex”) ‘hello’ 查了一下手册,还有这些codec可用 Codec Aliases Operand type Purpose base64_codec base64, base-64 byte string Convert operand to MIME base64 bz2_codec bz2 byte string Compress the operand using bz2 hex_codec hex byte st

用户评论
请输入评论内容
评分:
暂无评论