In a Python program that I am writing, I need to print the © (copyright) symbol. Is there an easy way to do this? Or is it not supported in Python? Here\'s an example.
The copyright sign is a unicode character. If your terminal supports a character encoding (such as utf-8 or cp1252) that includes this character, then you can print it:
This relies on Python detecting the terminal's character encoding:
In [64]: print(u'\N{COPYRIGHT SIGN}')
©
This uses an explicit encoding (which happens to work since my terminal is set to use the utf-8 character encoding):
In [65]: print(u'\N{COPYRIGHT SIGN}'.encode('utf-8'))
©