to express unicode string

contro opinion contropinion at gmail.com
Sat Jan 28 02:21:40 EST 2012


>>> s='你好'
>>> t=u'你好'
>>> s
'\xc4\xe3\xba\xc3'
>>> t
u'\u4f60\u597d'
>>> t=us
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'us' is not defined
>>>
how can i use us to express  u'你好'??
can i add someting in  us  to  express   u'你好'??
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20120128/6dbdedba/attachment.html>


More information about the Python-list mailing list