To print the Copiright Sign with Python we need to use the Unicode string literal format.
A quoted string with a "u" or a "U" just before the leading quote is an Unicode string.
The escape sequence "\N{name}" prints the character specified by "name", where "name" is a standard Unicode name, a s listed in www.unicode.org/charts/
Example:
print u'\N{Copyright Sign}'
prints the Copyright sign.
Wednesday, January 9, 2008
Print the Copiright Sign in Python
Pubblicato da
Pelerin-Voyageur
a
7:44 AM
Etichette: programming, python
Subscribe to:
Post Comments (Atom)
0 commenti:
Post a Comment