Python Foundation

Posted on 09/08/2019 in Python

What is Bytes? immutable sequences of bytes
b'data'
to convert between string and bytes, we must know the encoding of the byte sequence used to represent Unicode string Example:
data = "ABCD"
encodedData = data.encode('utf-8')
decodedData = encodedData.decode('utf-8')
Files, network resources, and HTTP responses are transmitted as **byte** streams