2 ms·
But bytes are not strings. Unless you convert them to a string first, they could be an image, a sound, a certificate, etc. Since ASCII strings are always one b
by ASalazarMX 7y ago
But bytes are not strings. Unless you convert them to a string first, they could be an image, a sound, a certificate, etc.
Since ASCII strings are always one byte per character, they can be manipulated as bytes, but UTF8 strings aren't. In Python3 you operate with strings and always get strings, you operate with bytes and always get bytes.
The string = byte array pattern is an atavism that should not exist this century.