🔥 Burn Fat Fast. Discover How! 💪

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 '