2011/07/24

python tips: print list contains japanese characters

>>> L = [u"ほげ", u"まげ"]
>>> L
[u'\u307b\u3052', u'\u307e\u3052']
>>> print repr(L).decode('unicode-escape')
[u'ほげ', u'まげ']
>>> 

No comments:

Post a Comment

100