Ich versuche, ihren Namen Unicode-Zeichen gegeben zu drucken, wie folgt:Python Escape-Sequenz N {name} nicht per Definition arbeiten
# -*- coding: utf-8 -*-
print "\N{SOLIDUS}"
print "\N{BLACK SPADE SUIT}"
jedoch der Ausgang ich nicht sehr ermutigend ist.
Die Escape-Sequenz wird so gedruckt, wie sie ist.
ActivePython 2.7.2.5 (ActiveState Software Inc.) based on
Python 2.7.2 (default, Jun 24 2011, 12:21:10) [MSC v.1500 32 bit (Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
>>> # -*- coding: utf-8 -*-
... print "\N{SOLIDUS}"
\N{SOLIDUS}
>>> print "\N{BLACK SPADE SUIT}"
\N{BLACK SPADE SUIT}
>>>
ich aber sehen, dass another asker dies erfolgreich tun konnte.
Was ist los?
Die andere Frage Python 3 wurde, sind Sie 2.7. –