我试图打印£
符号,但我似乎无法使用format()方法执行此操作。我尝试以下操作:
curr_prefix = u"\xA3"
print "{}".format(curr_prefix)
但是我收到以下错误:
UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 0: ordinal not in range(128)
答案 0 :(得分:2)
尝试print u"{}".format(curr_prefix)