阅读背景:

python处理中文字符

来源:互联网 

1.在py文件中使用中文字符

unicode.py文件内容如下所示:

 

# -*- coding:utf-8 -*-

str_ch = '我们women'
uni_ch = u'我们women'

print "type:", type(str_ch), "content:", str_ch,  repr(str_ch)
print "type:", type(uni_ch), "content:", uni_ch,  repr(uni_ch)
# -*



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: