Python2 vs Python3: str
Python2 中存在2种str
>>> a='123'
>>> b=u'123'
>>> type(a)
<type 'str'>
>>> type(b)
<type 'unicode'>
Python3中只存在1种str
>>> a='123'
>>> b=u'123'
>>> type(a)
<class 'str'>
>>> type(b)
<class 'str'>
>>> b='\u8bf7'
>>> type(b)
<class 'str'>
Python3新增了一种类似bytes
>>> b=b'\u8bf7'
>>> b.decode('unicode-escape')
'请'
>>>
>>> type(b)
<class 'bytes'>