An emoji is a pictogram, logogram, ideogram, or smiley embedded in text and used in electronic messages and web pages. They can represent emotion, weather conditions, hand gestures, people, animals, objects, etc. They replace the conventional typographical style.
In Python, emojis can be printed using their respective CLDR short names. Some CLDR short names include:
To print emojis using the CLDR short name, you prefix the CLDR short name with \N
and then enclose it a curly brace {}
Now, letβs write some lines of code that will print some emojis using the CLDR short names:
# for the winking face emoji
print('\N{winking face}')
# for the kissing face with closed eye emoji
print('\N{kissing face with closed eyes}')
# for the kissing face with smiling eyes emoji
print('\N{kissing face with smiling eyes}')
π
π
π
Note: Every emoji has a corresponding CLDR short name.