0

I'm trying to print the £ sign, but I cannot seem to do this using the format() methodology.I'm trying the following:

curr_prefix = u"\xA3"
print "{}".format(curr_prefix)

But I get the following error:

UnicodeEncodeError: 'ascii' codec can't encode character u'\xa3' in position 0: ordinal not in range(128)
smci
  • 32,567
  • 20
  • 113
  • 146
disruptive
  • 5,687
  • 15
  • 71
  • 135
  • This is a duplicate of a squillion other questions on printing Unicode in Python. Read them. – smci Jan 05 '15 at 19:17

1 Answers1

0

Try print u"{}".format(curr_prefix)

VHarisop
  • 2,816
  • 1
  • 14
  • 28