[Tutor] unicode question
Mats Wichmann
mats at wichmann.us
Mon Jun 6 19:30:53 EDT 2022
On 6/6/22 14:04, Alex Kleider wrote:
> I've been playing around with unicode a bit and found that the
> following code doesn't behave as I might have expected:
>
> Python 3.9.2 (default, Feb 28 2021, 17:03:44)
> [GCC 10.2.1 20210110] on linux
> Type "help", "copyright", "credits" or "license" for more information.
>>>> print("\N{middle dot}")
> ·
>>>>
>>>> middle_dot = '0140', '013F', '00B7', '2027'
Why not directly enter these in a usable form?
>>> middle_dot = "\N{LATIN SMALL LETTER L WITH MIDDLE DOT}", "\N{LATIN
CAPITAL LETTER L WITH MIDDLE DOT}"
>>> for n in middle_dot:
... print(n)
...
...
ŀ
Ŀ
(too lazy to go look up the other two, whatever they may be)
More information about the Tutor
mailing list