Python打印unicode列表

gon*_*aao 8 python string python-2.7 python-unicode

使用以下代码

lst = [u'\u5de5', u'\u5de5']
msg = repr(lst).decode('unicode-escape')
print msg
Run Code Online (Sandbox Code Playgroud)

我有

[u'?', u'?']
Run Code Online (Sandbox Code Playgroud)

如何删除前导u以使内容msg为:

['?', '?']
Run Code Online (Sandbox Code Playgroud)

fal*_*tru 14

>>> import sys
>>> lst = [u'\u5de5', u'\u5de5']
>>> msg = repr([x.encode(sys.stdout.encoding) for x in lst]).decode('string-escape')
>>> print msg
['?', '?']
Run Code Online (Sandbox Code Playgroud)