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
  • 29,564
  • 18
  • 109
  • 144
disruptive
  • 5,159
  • 12
  • 62
  • 119
  • 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,745
  • 1
  • 13
  • 25