k
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 🔥'
ля, прикольн, не знал