I am using Python 2.6.5. My code requires the use of the "more than or equal to" sign. Here it goes:
>>> s = u'\u2265' >>> print s >>> ≥ >>> print "{0}".format(s) Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\u2265' in position 0: ordinal not in range(128)`
Why do I get this error? Is there a right way to do this? I need to use the .format()
function.