python2.7 中由字符串变量构造前面带u的字符串的方法:
ss='test'
sb=u''+str(ss)
sb就是我们想要的前面带u的字符串
Python 2有两种字符串类型:Unicode字符串和非Unicode字符串。Python 3只有一种类型:Unicode字符串(Unicode strings)。
python2.7 中由字符串变量构造前面带u的字符串的方法:
ss='test'
sb=u''+str(ss)
sb就是我们想要的前面带u的字符串
Python 2有两种字符串类型:Unicode字符串和非Unicode字符串。Python 3只有一种类型:Unicode字符串(Unicode strings)。