python字符串中的中文處理

python字符串中的字符串默認並不是是unicode,若是在字符創中使用Unicode字符,如中文字符,必需要通過轉換,python

方式1: text = u"中文"code

方式2: text = Unicode("中文")unicode

相關文章
相關標籤/搜索