分类: coding

print emoj in python

full emoji code list

http://unicode.org/emoji/charts/full-emoji-list.html

# python3
import codecs

# print by code
emoji = 'U+1F600'
print(codecs.decode(f"\\U{emoji.split('+')[1]:>08}", "unicode_escape"))
>> 😀

# print by CLDR Short Name
print("\N{grinning face}")
>> 😀

# by emoji lib 
# pip install emoji
import emoji
print(emoji.emojize('Python is :thumbs_up:'))
>> Python is 👍

发表评论

评论

此站点使用Akismet来减少垃圾评论。了解我们如何处理您的评论数据