python中unicode和str的组合

python中unicode对象和str对象拼接在一起,会自动将str对象转换成unicode对象

即:a="aa"

b=u"bb"

c=a+b

type(c)会打印出此对象为unicode对象

另外,json.loads(a)返回的对象,key和value的类型均是unicode类型

原文地址:https://www.cnblogs.com/stubborn412/p/4260527.html