【发布时间】:2021-08-18 09:37:13
【问题描述】:
根据here 和here,Python 允许使用 unicode 字符的名称来获取字符。
例如:
print('\N{large red circle}')
????
我正在尝试弄清楚如何在不知道名称的情况下使用上述功能。即类似:
name = "large red circle"
emoji = some_code(name) # some code to use the above to produce '\N{large red circle}' without third party packages like 'emoji'
print(emoji)
????
有什么建议吗?
谢谢
【问题讨论】:
标签: python string unicode emoji