Answers for "python string vs byte string"

2

python string vs byte string

#A byte string can be decoded back into a character string, 
#if you know the encoding that was used to encode it.
b'I am a string'.decode('ASCII')
b'I am a string'.decode('utf-8')
Posted by: Guest on March-28-2022

Python Answers by Framework

Browse Popular Code Answers by Language