Skip to content

executeRawDatabaseCommand 的返回格式

ilvxna edited this page Aug 17, 2018 · 3 revisions

executeRawDatabaseCommand

生成的结果前面都会加上b‘’,请问这个怎么去掉?

: 生成的结果是bytes, 要去掉你要自己编码b'aaa'.decode("utf8"), 查查资料吧, 纯python的东西。

int(b'1')

python的东西,bytes 类型的字符串就会显示为 b'aaa',如果你想得到 'aaa',只需要将

b'aaa'.decode()

或者:

b'aaa'.decode("utf8")
Clone this wiki locally