Mar-18-2020, 12:15 AM
(This post was last modified: Mar-18-2020, 12:15 AM by Gribouillis.)
In python2, the string is already a binary string, so there is no need to pull the data from the string. Its contents is a sequence of bytes similar to a C char sequence.
Python 3's "string" type is python 2's "unicode" type
Python 3's "bytes" type is python 2's "string" type, with a few differences in the API because in python 3 the sequence is viewed as a sequence of small integers while in python 2 it is a sequence of chars. The contents is the same however.
Python 3's "string" type is python 2's "unicode" type
Python 3's "bytes" type is python 2's "string" type, with a few differences in the API because in python 3 the sequence is viewed as a sequence of small integers while in python 2 it is a sequence of chars. The contents is the same however.