bytes解码会得到str
str编码会变成bytes
>>> b'123'.decode('ascii')
'123'
>>> '123'.encode('ascii')
b'123'
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> a = b'123'
>>> a.decode()
'123'
b'123'.decode()
结果是'123'