Telegram Store
Русский
Español
Deutsch
Français
فارسی
Italiano
Português
Український
O'zbek
繁體中文
भारतीय
Bahasa Indonesia
Беларускі
Кыргызча
ኢትዮጵያዊ
தமிழ் மொழி
Türkçe
Add Channel
Download
Download
Blog
Catalog
Channels
Сhats
Stickers
Bots
Abuse
Log in
🔥 Burn Fat Fast. Discover How! 💪
Home
Channels
Technologies
Python etc
Python has rich support for Unicode, inc
Python has rich support for Unicode, including referencing gly | Python etc
Python has rich support for Unicode, including referencing glyphs (including emojis, of course) by name.
Get glyph name:
' '.encode('ascii', 'namereplace')
# b'\\N{ROLLING ON THE FLOOR LAUGHING}'
Convert name to a glyph:
'\N{ROLLING ON THE FLOOR LAUGHING}'
# ' '
# case doesn't matter:
'\N{Rolling on the Floor Laughing}'
# ' '
A good thing is that f-string also don't confused by named unicode glyphs:
fire = 'hello'
f'{fire} \N{fire}'
# 'hello '
Previous Message
Next Message
Go to the channel Python etc
Python etc
🕺 6.28K
Technologies
Regular tips about Python and programming in general. Owner — @pushtaev. The current season is run by @orsinium. Tips are appreciated: https://ko-fi.com/pythonetc / https://sobe.ru/na/pythonetc. © ...
Join
▲ Vote (1)
Login
×