When using Python to do network programming will inevitably encounter convert a string to the byte stream,Here we record the following commonly used methods:
First byte array to a string,That is str:
Then the string to a byte array:
[crayon-68b1ce765a3400216[……]