📜  python byte like to string - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:52.676000             🧑  作者: Mango

代码示例1
>>> b"abcde"
b'abcde'

# utf-8 is used here because it is a very common encoding, but you
# need to use the encoding your data is actually in.
>>> b"abcde".decode("utf-8") 
'abcde'